@indico-data/design-system 1.0.4 → 1.0.6
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/.eslintrc.js +1 -1
- package/lib/components/Accordion/Accordion.d.ts +9 -0
- package/lib/components/Accordion/Accordion.stories.d.ts +25 -0
- package/lib/components/Accordion/Accordion.styles.d.ts +276 -0
- package/lib/components/Accordion/index.d.ts +1 -0
- package/lib/components/Icon/Icon.d.ts +16 -0
- package/lib/components/Icon/Icon.stories.d.ts +41 -0
- package/lib/components/Icon/faIcons.d.ts +76 -0
- package/lib/components/Icon/index.d.ts +1 -0
- package/lib/components/Icon/indicons.d.ts +127 -0
- package/lib/components/Icon/storyHelpers.d.ts +822 -0
- package/lib/components/ListTable/Header/Header.d.ts +21 -0
- package/lib/components/ListTable/Header/Header.styles.d.ts +274 -0
- package/lib/components/ListTable/Header/index.d.ts +1 -0
- package/lib/components/ListTable/ListTable.d.ts +41 -0
- package/lib/components/ListTable/ListTable.stories.d.ts +54 -0
- package/lib/components/ListTable/ListTable.styles.d.ts +274 -0
- package/lib/components/ListTable/index.d.ts +1 -0
- package/lib/components/ListTable/mock-data/index.d.ts +1 -0
- package/lib/components/ListTable/mock-data/mock-data.d.ts +54 -0
- package/lib/components/Pagination/Pagination.d.ts +19 -0
- package/lib/components/Pagination/Pagination.stories.d.ts +18 -0
- package/lib/components/Pagination/Pagination.styles.d.ts +274 -0
- package/lib/components/Pagination/index.d.ts +1 -0
- package/lib/components/basic-section/Section/Section.d.ts +8 -0
- package/lib/components/basic-section/Section/Section.stories.d.ts +14 -0
- package/lib/components/basic-section/Section/Section.styles.d.ts +274 -0
- package/lib/components/basic-section/Section/index.d.ts +1 -0
- package/lib/components/basic-section/SectionBlock/SectionBlock.d.ts +9 -0
- package/lib/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +274 -0
- package/lib/components/basic-section/SectionBlock/index.d.ts +1 -0
- package/lib/components/basic-section/SectionBody/SectionBody.d.ts +7 -0
- package/lib/components/basic-section/SectionBody/SectionBody.stories.d.ts +11 -0
- package/lib/components/basic-section/SectionBody/SectionBody.styles.d.ts +274 -0
- package/lib/components/basic-section/SectionBody/index.d.ts +1 -0
- package/lib/components/basic-section/SectionHeader/SectionHeader.d.ts +14 -0
- package/lib/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +20 -0
- package/lib/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +274 -0
- package/lib/components/basic-section/SectionHeader/index.d.ts +1 -0
- package/lib/components/basic-section/SectionTable/SectionTable.d.ts +2 -0
- package/lib/components/basic-section/SectionTable/SectionTable.styles.d.ts +274 -0
- package/lib/components/basic-section/SectionTable/index.d.ts +1 -0
- package/lib/components/basic-section/index.d.ts +5 -0
- package/lib/components/buttons/Button/Button.d.ts +21 -0
- package/lib/components/buttons/Button/Button.stories.d.ts +25 -0
- package/lib/components/buttons/Button/Button.styles.d.ts +284 -0
- package/lib/components/buttons/Button/index.d.ts +1 -0
- package/lib/components/buttons/IconButton/IconButton.d.ts +33 -0
- package/lib/components/buttons/IconButton/IconButton.stories.d.ts +43 -0
- package/lib/components/buttons/IconButton/IconButton.styles.d.ts +571 -0
- package/lib/components/buttons/IconButton/index.d.ts +1 -0
- package/lib/components/buttons/commonStyles.d.ts +9 -0
- package/lib/components/buttons/index.d.ts +2 -0
- package/lib/components/buttons/types.d.ts +2 -0
- package/lib/components/dropdowns/BorderSelect/BorderSelect.d.ts +19 -0
- package/lib/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +32 -0
- package/lib/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +546 -0
- package/lib/components/dropdowns/BorderSelect/index.d.ts +1 -0
- package/lib/components/dropdowns/MultiCombobox/MultiCombobox.d.ts +23 -0
- package/lib/components/dropdowns/MultiCombobox/MultiCombobox.stories.d.ts +46 -0
- package/lib/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +86 -0
- package/lib/components/dropdowns/MultiCombobox/index.d.ts +1 -0
- package/lib/components/dropdowns/Select/Select.d.ts +19 -0
- package/lib/components/dropdowns/Select/Select.stories.d.ts +35 -0
- package/lib/components/dropdowns/Select/Select.styles.d.ts +274 -0
- package/lib/components/dropdowns/Select/index.d.ts +1 -0
- package/lib/components/dropdowns/SingleCombobox/SingleCombobox.d.ts +20 -0
- package/lib/components/dropdowns/SingleCombobox/SingleCombobox.stories.d.ts +32 -0
- package/lib/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +86 -0
- package/lib/components/dropdowns/SingleCombobox/index.d.ts +1 -0
- package/lib/components/dropdowns/commonStyles.d.ts +1 -0
- package/lib/components/dropdowns/index.d.ts +4 -0
- package/lib/components/dropdowns/types.d.ts +46 -0
- package/lib/components/dropdowns/useCombobox.d.ts +25 -0
- package/lib/components/dropdowns/utils.d.ts +21 -0
- package/lib/components/index.d.ts +10 -0
- package/lib/components/inputs/EditableInput/EditableInput.d.ts +13 -0
- package/lib/components/inputs/EditableInput/EditableInput.stories.d.ts +15 -0
- package/lib/components/inputs/EditableInput/EditableInput.styles.d.ts +274 -0
- package/lib/components/inputs/EditableInput/index.d.ts +1 -0
- package/lib/components/inputs/NumberInput/NumberInput.d.ts +23 -0
- package/lib/components/inputs/NumberInput/NumberInput.stories.d.ts +28 -0
- package/lib/components/inputs/NumberInput/NumberInput.styles.d.ts +274 -0
- package/lib/components/inputs/NumberInput/index.d.ts +1 -0
- package/lib/components/inputs/SearchInput/SearchInput.d.ts +18 -0
- package/lib/components/inputs/SearchInput/SearchInput.stories.d.ts +27 -0
- package/lib/components/inputs/SearchInput/SearchInput.styles.d.ts +274 -0
- package/lib/components/inputs/SearchInput/index.d.ts +1 -0
- package/lib/components/inputs/TextInput/TextInput.d.ts +24 -0
- package/lib/components/inputs/TextInput/TextInput.stories.d.ts +62 -0
- package/lib/components/inputs/TextInput/TextInput.styles.d.ts +546 -0
- package/lib/components/inputs/TextInput/index.d.ts +1 -0
- package/lib/components/inputs/index.d.ts +4 -0
- package/lib/components/inputs/inputsCommon.styles.d.ts +4 -0
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.d.ts +7 -0
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.stories.d.ts +10 -0
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.styles.d.ts +274 -0
- package/lib/components/loading-indicators/BarSpinner/index.d.ts +1 -0
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.d.ts +10 -0
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.stories.d.ts +12 -0
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.styles.d.ts +8 -0
- package/lib/components/loading-indicators/CirclePulse/index.d.ts +1 -0
- package/lib/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +12 -0
- package/lib/components/loading-indicators/CircleSpinner/CircleSpinner.stories.d.ts +10 -0
- package/lib/components/loading-indicators/CircleSpinner/index.d.ts +1 -0
- package/lib/components/loading-indicators/LoadingList/LoadingList.d.ts +2 -0
- package/lib/components/loading-indicators/LoadingList/LoadingList.stories.d.ts +11 -0
- package/lib/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +274 -0
- package/lib/components/loading-indicators/LoadingList/index.d.ts +1 -0
- package/lib/components/loading-indicators/PercentageRing/PercentageRing.d.ts +13 -0
- package/lib/components/loading-indicators/PercentageRing/PercentageRing.stories.d.ts +10 -0
- package/lib/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +274 -0
- package/lib/components/loading-indicators/PercentageRing/index.d.ts +1 -0
- package/lib/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.d.ts +2 -0
- package/lib/components/loading-indicators/RandomLoadingMessage/RandomLoadingMessage.stories.d.ts +11 -0
- package/lib/components/loading-indicators/RandomLoadingMessage/index.d.ts +1 -0
- package/lib/components/loading-indicators/RandomLoadingMessage/random-messages.d.ts +2 -0
- package/lib/components/loading-indicators/index.d.ts +6 -0
- package/lib/components/user-feedback/Shrug/Shrug.d.ts +14 -0
- package/lib/components/user-feedback/Shrug/Shrug.stories.d.ts +31 -0
- package/lib/components/user-feedback/Shrug/Shrug.styles.d.ts +274 -0
- package/lib/components/user-feedback/Shrug/index.d.ts +1 -0
- package/lib/components/user-feedback/index.d.ts +1 -0
- package/lib/index.d.ts +407 -0
- package/lib/index.esm.js +34337 -34165
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +34337 -34164
- package/lib/index.js.map +1 -1
- package/lib/styles/globals/buttons.d.ts +2 -0
- package/lib/styles/globals/forms.d.ts +2 -0
- package/lib/styles/globals/index.d.ts +2 -0
- package/lib/styles/globals/layout.d.ts +2 -0
- package/lib/styles/globals/lists.d.ts +2 -0
- package/lib/styles/globals/margin-padding.d.ts +2 -0
- package/lib/styles/globals/media.d.ts +2 -0
- package/lib/styles/globals/tables.d.ts +2 -0
- package/lib/styles/globals/typography.d.ts +2 -0
- package/lib/styles/globals/utility-classes.d.ts +2 -0
- package/lib/tokens/animation.d.ts +4 -0
- package/lib/tokens/breakpoints.d.ts +10 -0
- package/lib/tokens/colors.d.ts +130 -0
- package/lib/tokens/index.d.ts +8 -0
- package/lib/tokens/margin.d.ts +4 -0
- package/lib/tokens/numbers.d.ts +10 -0
- package/lib/tokens/padding.d.ts +4 -0
- package/lib/tokens/spacings.d.ts +5 -0
- package/lib/tokens/typography.d.ts +49 -0
- package/lib/types.d.ts +206 -0
- package/package.json +7 -1
- package/rollup.config.mjs +1 -1
- package/src/components/Accordion/Accordion.tsx +1 -1
- package/src/components/Icon/Icon.stories.tsx +2 -1
- package/src/components/Icon/Icon.tsx +1 -3
- package/src/components/Icon/index.ts +0 -1
- package/src/components/Icon/storyHelpers.tsx +2 -1
- package/src/components/ListTable/Header/Header.tsx +3 -1
- package/src/components/ListTable/ListTable.tsx +6 -1
- package/src/components/basic-section/SectionTable/SectionTable.tsx +3 -1
- package/src/components/buttons/Button/Button.tsx +1 -1
- package/src/components/buttons/IconButton/IconButton.tsx +4 -1
- package/src/components/dropdowns/Select/Select.tsx +1 -1
- package/src/components/dropdowns/SingleCombobox/SingleCombobox.tsx +1 -1
- package/src/components/index.ts +17 -9
- package/src/components/inputs/EditableInput/EditableInput.tsx +1 -1
- package/src/components/inputs/NumberInput/NumberInput.tsx +2 -1
- package/src/components/inputs/SearchInput/SearchInput.tsx +1 -1
- package/src/components/user-feedback/Shrug/Shrug.tsx +2 -1
- package/src/index.ts +28 -1
- package/src/types.ts +10 -0
- package/tsconfig.json +16 -4
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React, { ChangeEvent } from 'react';
|
|
3
|
+
import { PermafrostComponent, IconName } from '@/types';
|
|
4
|
+
import { AriaButtonProps } from '@react-types/button';
|
|
5
|
+
|
|
6
|
+
type Props$i = PermafrostComponent & {
|
|
7
|
+
content: React.ReactNode;
|
|
8
|
+
header?: React.ReactNode | string;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare const Accordion: (props: Props$i) => React.JSX.Element;
|
|
12
|
+
|
|
13
|
+
type Props$h = PermafrostComponent & {
|
|
14
|
+
style?: object;
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
};
|
|
17
|
+
declare const Section: (props: Props$h) => React.JSX.Element;
|
|
18
|
+
|
|
19
|
+
type Props$g = PermafrostComponent & {
|
|
20
|
+
title?: string;
|
|
21
|
+
style?: object;
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
};
|
|
24
|
+
declare const SectionBlock: (props: Props$g) => React.JSX.Element;
|
|
25
|
+
|
|
26
|
+
type SectionBodyProps = PermafrostComponent & {
|
|
27
|
+
style?: object;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
};
|
|
30
|
+
declare const SectionBody: (props: SectionBodyProps) => React.JSX.Element;
|
|
31
|
+
|
|
32
|
+
type Props$f = PermafrostComponent & {
|
|
33
|
+
style?: object;
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
};
|
|
36
|
+
declare const SectionHeader: {
|
|
37
|
+
(props: Props$f): React.JSX.Element;
|
|
38
|
+
defaultProps: {
|
|
39
|
+
className: string;
|
|
40
|
+
style: {};
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
declare const SectionTable: (props: any) => React.JSX.Element;
|
|
45
|
+
|
|
46
|
+
type ButtonVariant$1 = 'primary' | 'cta' | 'normal' | 'link-style' | 'no-style' | 'outline';
|
|
47
|
+
type ButtonProps = PermafrostComponent & {
|
|
48
|
+
'aria-label'?: string;
|
|
49
|
+
'aria-pressed'?: boolean;
|
|
50
|
+
'aria-selected'?: boolean;
|
|
51
|
+
busy?: boolean;
|
|
52
|
+
children: React.ReactNode | React.ReactNode[];
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
onClick: (...args: any[]) => void;
|
|
55
|
+
onFocus?: () => void;
|
|
56
|
+
role?: string;
|
|
57
|
+
style?: React.CSSProperties;
|
|
58
|
+
tabindex?: 0 | -1;
|
|
59
|
+
type?: 'submit' | 'button' | 'reset';
|
|
60
|
+
variant?: ButtonVariant$1;
|
|
61
|
+
onMouseEnter?: () => void;
|
|
62
|
+
onMouseLeave?: () => void;
|
|
63
|
+
};
|
|
64
|
+
declare function Button(props: ButtonProps): React.ReactElement;
|
|
65
|
+
|
|
66
|
+
type ButtonVariant = 'default' | 'primary' | 'destructive';
|
|
67
|
+
type ButtonSize = 'normal' | 'large';
|
|
68
|
+
|
|
69
|
+
type Props$e = PermafrostComponent & {
|
|
70
|
+
/**
|
|
71
|
+
* Adjusts vertical alignment of the text label, in relation to the icon
|
|
72
|
+
*/
|
|
73
|
+
adjustAlignment?: number;
|
|
74
|
+
busy?: boolean;
|
|
75
|
+
iconName: IconName;
|
|
76
|
+
iconSide?: 'start' | 'end';
|
|
77
|
+
isDisabled?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* If element will be an `<a>`, the href URL
|
|
80
|
+
*/
|
|
81
|
+
isLink?: string;
|
|
82
|
+
label?: string;
|
|
83
|
+
size?: ButtonSize;
|
|
84
|
+
style?: React.CSSProperties;
|
|
85
|
+
variant?: ButtonVariant;
|
|
86
|
+
} & AriaButtonProps;
|
|
87
|
+
/**
|
|
88
|
+
* General utility “button with an icon” component. May also be used for links that _look_
|
|
89
|
+
* like buttons, via the `isLink` property.
|
|
90
|
+
*
|
|
91
|
+
* The button handler must be passed in via the `onPress` property (replaces `onClick`).
|
|
92
|
+
*
|
|
93
|
+
* @see {@link https://react-spectrum.adobe.com/blog/building-a-button-part-1.html}
|
|
94
|
+
*/
|
|
95
|
+
declare function IconButton(props: Props$e): React.JSX.Element;
|
|
96
|
+
|
|
97
|
+
type Props$d = PermafrostComponent & {
|
|
98
|
+
defaultValue?: string;
|
|
99
|
+
disabled?: boolean;
|
|
100
|
+
horizontal?: boolean;
|
|
101
|
+
initialText?: string;
|
|
102
|
+
label?: string;
|
|
103
|
+
onChange(e: React.ChangeEvent<HTMLSelectElement>): void;
|
|
104
|
+
options: {
|
|
105
|
+
name: string;
|
|
106
|
+
value: string | number;
|
|
107
|
+
}[];
|
|
108
|
+
style?: object;
|
|
109
|
+
value?: string | number;
|
|
110
|
+
validationErrors?: string[];
|
|
111
|
+
};
|
|
112
|
+
declare const BorderSelect: (props: Props$d) => React.JSX.Element;
|
|
113
|
+
|
|
114
|
+
type ComboboxProps = {
|
|
115
|
+
'aria-label'?: string;
|
|
116
|
+
'aria-labelledby'?: string;
|
|
117
|
+
className?: string;
|
|
118
|
+
closeMenuOnSelect?: boolean;
|
|
119
|
+
/**
|
|
120
|
+
* Function to generate a custom React component for every available list `Option`
|
|
121
|
+
* @see {@link https://react-select.com/props#option}
|
|
122
|
+
*/
|
|
123
|
+
customOption?: (props: any) => JSX.Element;
|
|
124
|
+
/**
|
|
125
|
+
* Customize the text to appear in selected items.
|
|
126
|
+
*
|
|
127
|
+
* @example (option) => `${option.value}`
|
|
128
|
+
*/
|
|
129
|
+
customOptionLabel?(option: any): string;
|
|
130
|
+
/**
|
|
131
|
+
* Customize the value for the Combobox to use. Defaults to `value`
|
|
132
|
+
*
|
|
133
|
+
* @example (option) => `${option.id}`
|
|
134
|
+
*/
|
|
135
|
+
customOptionValue?(option: any): string;
|
|
136
|
+
defaultValue?: any[];
|
|
137
|
+
disabled?: boolean;
|
|
138
|
+
loading?: boolean;
|
|
139
|
+
menuIsOpen?: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Custom text to show if there are no more items available to select
|
|
142
|
+
*/
|
|
143
|
+
noOptionsMessage?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Combobox defaults to expect { label: string; value: string; } at minimum - use `customOptionLabel` and `customOptionValue` props to change
|
|
146
|
+
*/
|
|
147
|
+
options: ComboboxOption[];
|
|
148
|
+
/**
|
|
149
|
+
* Input placeholder text
|
|
150
|
+
*/
|
|
151
|
+
placeholder?: string;
|
|
152
|
+
};
|
|
153
|
+
type ComboboxOption = {
|
|
154
|
+
label?: string;
|
|
155
|
+
[key: string]: any;
|
|
156
|
+
};
|
|
157
|
+
type ComboboxSize = 'small' | 'medium';
|
|
158
|
+
type ComboboxVariant = 'default' | 'light';
|
|
159
|
+
|
|
160
|
+
type Props$c = PermafrostComponent & {
|
|
161
|
+
disabled?: boolean;
|
|
162
|
+
initialText?: string;
|
|
163
|
+
options: {
|
|
164
|
+
name: string;
|
|
165
|
+
value: string | number;
|
|
166
|
+
}[];
|
|
167
|
+
size?: ComboboxSize;
|
|
168
|
+
style?: object;
|
|
169
|
+
value?: string | number;
|
|
170
|
+
variant?: ComboboxVariant;
|
|
171
|
+
onChange(e: React.ChangeEvent<HTMLSelectElement>): void;
|
|
172
|
+
onClick?(e: React.MouseEvent<HTMLDivElement, MouseEvent>): void;
|
|
173
|
+
};
|
|
174
|
+
declare const Select: (props: Props$c) => React.JSX.Element;
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Multiselect combobox component. If selections are not bound to outside state
|
|
178
|
+
* via the `value` prop, you will need to import and use the `useCombobox` hook
|
|
179
|
+
* in order to clear its selected value .
|
|
180
|
+
*
|
|
181
|
+
* @see [useCombobox]{@link import('useCombobox').useCombobox}
|
|
182
|
+
*/
|
|
183
|
+
declare const MultiCombobox: React.ForwardRefExoticComponent<PermafrostComponent & ComboboxProps & {
|
|
184
|
+
/**
|
|
185
|
+
* MultiValue is a selected option in the input area
|
|
186
|
+
*/
|
|
187
|
+
multiValueProps?: {
|
|
188
|
+
'data-cy': string;
|
|
189
|
+
} | undefined;
|
|
190
|
+
optionProps?: {
|
|
191
|
+
'data-cy': string;
|
|
192
|
+
} | undefined;
|
|
193
|
+
values?: ComboboxOption[] | undefined;
|
|
194
|
+
onChange: (selectedOption: ComboboxOption[]) => void;
|
|
195
|
+
} & React.RefAttributes<unknown>>;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Combobox component to select a single option. If selections are not bound to
|
|
199
|
+
* outside state via the `value` prop, you will need to import and use the
|
|
200
|
+
* `useCombobox` hook in order to clear its selected value.
|
|
201
|
+
*
|
|
202
|
+
* @see [useCombobox]{@link import('useCombobox').useCombobox}
|
|
203
|
+
*/
|
|
204
|
+
declare const SingleCombobox: React.ForwardRefExoticComponent<PermafrostComponent & ComboboxProps & {
|
|
205
|
+
dropdownIndicatorProps?: {
|
|
206
|
+
'data-cy': string;
|
|
207
|
+
} | undefined;
|
|
208
|
+
optionProps?: {
|
|
209
|
+
'data-cy': string;
|
|
210
|
+
} | undefined;
|
|
211
|
+
value?: ComboboxOption | undefined;
|
|
212
|
+
onChange: (selectedOption: ComboboxOption) => void;
|
|
213
|
+
} & React.RefAttributes<unknown>>;
|
|
214
|
+
|
|
215
|
+
type Props$b = PermafrostComponent & {
|
|
216
|
+
ariaLabel?: string;
|
|
217
|
+
fill?: string;
|
|
218
|
+
name: IconName;
|
|
219
|
+
size?: [string | number] | [string | number, string | number];
|
|
220
|
+
style?: any;
|
|
221
|
+
onClick?(): void;
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* Generic icon component, hidden from Assistive Technology by default.
|
|
225
|
+
* If icon should be available to AT, pass the desired name into the `ariaLabel` prop.
|
|
226
|
+
*/
|
|
227
|
+
declare function Icon({ style, ...props }: Props$b): React.ReactElement | null;
|
|
228
|
+
|
|
229
|
+
type Props$a = PermafrostComponent & {
|
|
230
|
+
children: React.ReactNode | string;
|
|
231
|
+
minLength?: number;
|
|
232
|
+
onUpdate?(newValue: string): void;
|
|
233
|
+
};
|
|
234
|
+
/**
|
|
235
|
+
* Wrapper component which enables text editing in place directly on a child component,
|
|
236
|
+
* element, or plain text.
|
|
237
|
+
*/
|
|
238
|
+
declare function EditableInput(props: Props$a): React.JSX.Element;
|
|
239
|
+
|
|
240
|
+
type Props$9 = PermafrostComponent & {
|
|
241
|
+
autoFocus?: boolean;
|
|
242
|
+
decrement?(): void;
|
|
243
|
+
disabled?: boolean;
|
|
244
|
+
hiddenLabel?: boolean;
|
|
245
|
+
increment?(): void;
|
|
246
|
+
label: string;
|
|
247
|
+
max?: number;
|
|
248
|
+
min?: number;
|
|
249
|
+
onChange(value: number | ''): void;
|
|
250
|
+
placeholder?: string;
|
|
251
|
+
required?: boolean;
|
|
252
|
+
step?: string;
|
|
253
|
+
tabIndex?: number;
|
|
254
|
+
value: number | '';
|
|
255
|
+
};
|
|
256
|
+
/**
|
|
257
|
+
* Basic numeric input field. A label is required, but may be visually hidden
|
|
258
|
+
* using the `hiddenLabel` property.
|
|
259
|
+
*/
|
|
260
|
+
declare function NumberInput(props: Props$9): React.ReactElement;
|
|
261
|
+
|
|
262
|
+
type Props$8 = PermafrostComponent & {
|
|
263
|
+
inputProps?: {
|
|
264
|
+
[key: string]: string;
|
|
265
|
+
};
|
|
266
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
267
|
+
onKeyUp?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
268
|
+
placeholder?: string;
|
|
269
|
+
value?: string;
|
|
270
|
+
};
|
|
271
|
+
declare const SearchInput: {
|
|
272
|
+
(props: Props$8): React.JSX.Element;
|
|
273
|
+
defaultProps: {
|
|
274
|
+
className: string;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
type Props$7 = PermafrostComponent & {
|
|
279
|
+
autoComplete?: 'email' | 'current-password' | 'new-password' | string;
|
|
280
|
+
autoFocus?: boolean;
|
|
281
|
+
defaultValue?: string;
|
|
282
|
+
disabled?: boolean;
|
|
283
|
+
displayErrors?: boolean;
|
|
284
|
+
inputProps?: any;
|
|
285
|
+
label?: string;
|
|
286
|
+
maxLength?: number;
|
|
287
|
+
name?: string;
|
|
288
|
+
onBlur?(): void;
|
|
289
|
+
onChange?(event: ChangeEvent<HTMLInputElement>): void;
|
|
290
|
+
onFocus?(): void;
|
|
291
|
+
placeholder?: string;
|
|
292
|
+
promptProps?: any;
|
|
293
|
+
required?: boolean;
|
|
294
|
+
type?: 'text' | 'email' | 'password' | string;
|
|
295
|
+
validationErrors?: string[];
|
|
296
|
+
value?: string;
|
|
297
|
+
readOnly?: boolean;
|
|
298
|
+
};
|
|
299
|
+
declare function TextInput(props: Props$7): React.ReactElement;
|
|
300
|
+
|
|
301
|
+
type Props$6 = PermafrostComponent & {
|
|
302
|
+
ariaLabel?: string;
|
|
303
|
+
size?: string;
|
|
304
|
+
style?: {
|
|
305
|
+
[key: string]: string;
|
|
306
|
+
};
|
|
307
|
+
fill?: string;
|
|
308
|
+
};
|
|
309
|
+
declare function CircleSpinner(props: Props$6): React.ReactElement;
|
|
310
|
+
|
|
311
|
+
type Props$5 = PermafrostComponent & {
|
|
312
|
+
width?: string;
|
|
313
|
+
};
|
|
314
|
+
declare function BarSpinner(props: Props$5): React.ReactElement;
|
|
315
|
+
|
|
316
|
+
type Props$4 = PermafrostComponent & {
|
|
317
|
+
color?: string;
|
|
318
|
+
overallSize?: string | number;
|
|
319
|
+
rippleSize?: string | number;
|
|
320
|
+
showRandomMessage?: boolean;
|
|
321
|
+
};
|
|
322
|
+
declare function CirclePulse(props: Props$4): React.ReactElement;
|
|
323
|
+
|
|
324
|
+
declare const RandomLoadingMessage: () => React.JSX.Element;
|
|
325
|
+
|
|
326
|
+
type Props$3 = PermafrostComponent & {
|
|
327
|
+
backgroundColor?: string;
|
|
328
|
+
foregroundColor?: string;
|
|
329
|
+
ringRadius?: number;
|
|
330
|
+
strokeWidth?: number;
|
|
331
|
+
/** an integer between 0 and 1 */
|
|
332
|
+
value: number;
|
|
333
|
+
valueFontSize?: number;
|
|
334
|
+
};
|
|
335
|
+
declare function PercentageRing(props: Props$3): React.JSX.Element;
|
|
336
|
+
|
|
337
|
+
declare const LoadingList: () => React.JSX.Element;
|
|
338
|
+
|
|
339
|
+
type Props$2 = PermafrostComponent & {
|
|
340
|
+
accordion?: boolean;
|
|
341
|
+
accordionDefaultOpen?: boolean;
|
|
342
|
+
emptyListMessage?: string;
|
|
343
|
+
error?: any;
|
|
344
|
+
errorMessage?: any;
|
|
345
|
+
headerComponent?: React.ReactNode;
|
|
346
|
+
listHeader: React.ReactNode;
|
|
347
|
+
listItems: React.ReactNode[];
|
|
348
|
+
loading?: any;
|
|
349
|
+
pagination?: {
|
|
350
|
+
currentPage: number;
|
|
351
|
+
limit: number;
|
|
352
|
+
pageInfo: {
|
|
353
|
+
startCursor: number;
|
|
354
|
+
endCursor: number;
|
|
355
|
+
hasNextPage: boolean;
|
|
356
|
+
aggregateCount: number;
|
|
357
|
+
};
|
|
358
|
+
getNextPage: (before: number) => void;
|
|
359
|
+
getPage: (after: number, pageOffset: number) => void;
|
|
360
|
+
getPreviousPage: (after: number) => void;
|
|
361
|
+
};
|
|
362
|
+
sortBy?: {
|
|
363
|
+
descending: boolean;
|
|
364
|
+
items: {
|
|
365
|
+
name: string;
|
|
366
|
+
value: string;
|
|
367
|
+
}[];
|
|
368
|
+
value: string;
|
|
369
|
+
onSort: (value: string) => void;
|
|
370
|
+
updateDescending: () => void;
|
|
371
|
+
};
|
|
372
|
+
subTitle?: string | React.ReactNode;
|
|
373
|
+
title: string;
|
|
374
|
+
totalCount?: number;
|
|
375
|
+
};
|
|
376
|
+
declare const ListTable: (props: Props$2) => React.JSX.Element;
|
|
377
|
+
|
|
378
|
+
type Props$1 = PermafrostComponent & {
|
|
379
|
+
currentPage: number;
|
|
380
|
+
limit: number;
|
|
381
|
+
pageInfo: {
|
|
382
|
+
aggregateCount: number;
|
|
383
|
+
endCursor: number;
|
|
384
|
+
hasNextPage: boolean;
|
|
385
|
+
startCursor: number;
|
|
386
|
+
};
|
|
387
|
+
quantity: number;
|
|
388
|
+
skip?: number;
|
|
389
|
+
getPage(startCursor: number, endCursor: number): void;
|
|
390
|
+
getNextPage(cursor: number): void;
|
|
391
|
+
getPreviousPage(cursor: number): void;
|
|
392
|
+
};
|
|
393
|
+
declare function Pagination(props: Props$1): React.JSX.Element;
|
|
394
|
+
|
|
395
|
+
type Props = PermafrostComponent & {
|
|
396
|
+
actionLink?: string;
|
|
397
|
+
actionText?: string;
|
|
398
|
+
buttonAction?(): void;
|
|
399
|
+
buttonText?: string;
|
|
400
|
+
message?: string | React.ReactNode;
|
|
401
|
+
messageProps?: {
|
|
402
|
+
'data-cy': string;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
declare function Shrug(props: Props): React.ReactElement;
|
|
406
|
+
|
|
407
|
+
export { Accordion, BarSpinner, BorderSelect, Button, CirclePulse, CircleSpinner, EditableInput, Icon, IconButton, ListTable, LoadingList, MultiCombobox, NumberInput, Pagination, PercentageRing, RandomLoadingMessage, SearchInput, Section, SectionBlock, SectionBody, SectionHeader, SectionTable, Select, Shrug, SingleCombobox, TextInput };
|