@northlight/ui 2.10.1 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/northlight.d.mts +383 -216
- package/dist/es/northlight.mjs +3164 -2768
- package/dist/es/northlight.mjs.map +1 -1
- package/dist/ts/types.d.ts +383 -216
- package/dist/umd/northlight.js +3165 -2767
- package/dist/umd/northlight.js.map +1 -1
- package/dist/umd/northlight.min.js +3 -3
- package/dist/umd/northlight.min.js.map +1 -1
- package/package.json +30 -29
package/dist/es/northlight.d.mts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { AccordionProps, AccordionButtonProps, AccordionPanelProps, AccordionItemProps, AvatarProps as AvatarProps$1, AlertProps as AlertProps$1, AspectRatioProps, StackProps, BadgeProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1,
|
|
1
|
+
import { AccordionProps, AccordionButtonProps, AccordionPanelProps, AccordionItemProps, StackDirection, AvatarProps as AvatarProps$1, AlertProps as AlertProps$1, AspectRatioProps, StackProps, BadgeProps, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, IconButtonProps as IconButtonProps$1, InputProps, FlexProps, BoxProps, TagProps as TagProps$1, IconProps as IconProps$1, SystemStyleObject, HeadingProps as HeadingProps$1, TextProps, FormLabelProps as FormLabelProps$1, Heading, Text, ModalProps as ModalProps$1, NumberInputProps as NumberInputProps$1, PinInputProps as PinInputProps$1, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, SpinnerProps as SpinnerProps$1, SwitchProps as SwitchProps$1, TableProps as TableProps$1, TabsProps as TabsProps$1, TabPanelProps as TabPanelProps$1, TextareaProps as TextareaProps$1, UseToastOptions as UseToastOptions$1, FadeProps as FadeProps$1, ScaleFadeProps as ScaleFadeProps$1, SlideProps as SlideProps$1, SlideFadeProps as SlideFadeProps$1, CollapseProps as CollapseProps$1, TabListProps, TabProps, LinkProps, GridProps, GridItemProps, EditableProps as EditableProps$1 } from '@chakra-ui/react';
|
|
2
2
|
export { AbsoluteCenter, AccordionButtonProps, AccordionIcon, AccordionIconProps, AccordionItemProps, AccordionPanelProps, AccordionProps, AlertDescription, AlertDialog, AlertDialogBody, AlertDialogCloseButton, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertIcon, AlertTitle, AspectRatioProps, BadgeProps, Box, BoxProps, BreadcrumbItem as Breadcrumb, BreadcrumbLink, BreadcrumbSeparator, Breadcrumb as Breadcrumbs, ButtonGroup, Card, CardBody, CardFooter, CardHeader, Center, Modal as ChakraModal, CheckboxGroup, Circle, CircularProgress, CircularProgressLabel, CloseButton, Code, Container, Divider, Drawer, DrawerBody, DrawerCloseButton, DrawerContent, DrawerFooter, DrawerHeader, DrawerOverlay, Editable, EditableInput, EditablePreview, Flex, FormControl, FormErrorMessage, FormHelperText, Grid, GridItem, HStack, Heading, Hide, Highlight, Image, Input, InputAddon, InputGroup, InputLeftAddon, InputLeftElement, InputRightAddon, InputRightElement, Kbd, Link, LinkBox, LinkOverlay, List, ListIcon, ListItem, Menu, MenuButton, MenuCommand, MenuDivider, MenuGroup, MenuIcon, MenuItem, MenuItemOption, MenuList, MenuOptionGroup, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, NumberDecrementStepper, NumberIncrementStepper, OrderedList, PinInputField, Popover, PopoverAnchor, PopoverArrow, PopoverBody, PopoverCloseButton, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger, Portal, RangeSlider, RangeSliderFilledTrack, RangeSliderMark, RangeSliderThumb, RangeSliderTrack, Show, SimpleGrid, Skeleton, SkeletonCircle, SkeletonText, Slider, SliderFilledTrack, SliderMark, SliderThumb, SliderTrack, Spacer, Stack, StackDivider, StackProps, Stat, StatArrow, StatGroup, StatHelpText, StatLabel, StatNumber, TabIndicator as StepIndicator, TabPanels as StepPanels, Tab, TabIndicator, TabList, TabPanels, TableBodyProps, TableCaption, TableCaptionProps, TableCellProps, TableColumnHeaderProps, TableContainer, TableContainerProps, TableFooterProps, TableHeadProps, TableRowProps, TagCloseButton, TagLabel, TagLeftIcon, TagRightIcon, Tbody, Td, Text, Tfoot, Th, Thead, Tooltip, Tr, UnorderedList, VStack, VisuallyHidden, VisuallyHiddenInput, Wrap, WrapItem, useBoolean, useBreakpoint, useBreakpointValue, useClipboard, useControllableProp, useControllableState, useDisclosure, useEditable, useEditableControls, useEditableState, useInterval, useMediaQuery, useMergeRefs, useNumberInput, useOutsideClick, usePrefersReducedMotion, useRadio, useRadioGroup, useTab, useTabs, useTheme, useToken } from '@chakra-ui/react';
|
|
3
|
+
import { Props, GroupBase, MultiValue, SingleValue, ActionMeta, MenuListProps, SelectInstance, ChakraStylesConfig } from 'chakra-react-select';
|
|
4
|
+
export { AsyncCreatableSelect, AsyncSelect, Select as ChakraReactSelect, CreatableSelect } from 'chakra-react-select';
|
|
3
5
|
import * as React$1 from 'react';
|
|
4
|
-
import React__default, {
|
|
6
|
+
import React__default, { ComponentType, Ref, ComponentProps, ChangeEvent, InputHTMLAttributes, ReactNode, ReactElement, RefObject, MutableRefObject, EffectCallback, DependencyList } from 'react';
|
|
5
7
|
import { RegisterOptions, FieldValues, UseFormReturn as UseFormReturn$1, SetValueConfig, FieldPath, Control, ControllerRenderProps, UseFormProps, FieldError, Merge, FieldErrorsImpl } from 'react-hook-form';
|
|
6
8
|
export { useController, useFieldArray, useForm, useFormContext, useFormState, useWatch } from 'react-hook-form';
|
|
9
|
+
import * as _chakra_ui_system_dist_system_types from '@chakra-ui/system/dist/system.types';
|
|
10
|
+
import * as _chakra_ui_button_dist_button from '@chakra-ui/button/dist/button';
|
|
7
11
|
import { CheckboxGroupState } from '@react-stately/checkbox';
|
|
8
12
|
import { RadioGroupState } from '@react-stately/radio';
|
|
9
13
|
import { CSSObject } from '@emotion/react';
|
|
10
14
|
import { DateValue } from '@internationalized/date';
|
|
11
15
|
import { AriaDatePickerProps, AriaDateRangePickerProps } from '@react-aria/datepicker';
|
|
12
|
-
import { Props, GroupBase, ActionMeta, ChakraStylesConfig, SelectInstance, MultiValue, SingleValue, MenuListProps } from 'chakra-react-select';
|
|
13
|
-
export { AsyncCreatableSelect, AsyncSelect, Select as ChakraReactSelect, CreatableSelect } from 'chakra-react-select';
|
|
14
16
|
import { DndContextProps, UseDroppableArguments, UseDraggableArguments, UniqueIdentifier, CollisionDetection, SensorDescriptor, SensorOptions, Modifiers } from '@dnd-kit/core';
|
|
15
17
|
export * from '@dnd-kit/core';
|
|
16
18
|
import { UseSortableArguments, SortingStrategy, SortableContextProps } from '@dnd-kit/sortable';
|
|
@@ -20,9 +22,10 @@ export * from '@dnd-kit/utilities';
|
|
|
20
22
|
export { useInterval as dndUseInterval } from '@dnd-kit/utilities';
|
|
21
23
|
export * from '@dnd-kit/modifiers';
|
|
22
24
|
import { VariableSizeListProps, VariableSizeList, VariableSizeGridProps, VariableSizeGrid } from 'react-window';
|
|
23
|
-
import * as
|
|
25
|
+
import * as react_select from 'react-select';
|
|
24
26
|
import { Props as Props$1 } from 'react-input-mask';
|
|
25
|
-
import
|
|
27
|
+
import { NumericFormatProps } from 'react-number-format';
|
|
28
|
+
import * as _chakra_ui_toast_dist_toast_types_24f022fd from '@chakra-ui/toast/dist/toast.types-24f022fd';
|
|
26
29
|
import { UseClickableProps } from '@chakra-ui/clickable';
|
|
27
30
|
import * as _react_types_shared from '@react-types/shared';
|
|
28
31
|
import * as _react_aria_focus from '@react-aria/focus';
|
|
@@ -99,6 +102,205 @@ declare const AccordionPanel: (props: AccordionPanelProps) => JSX.Element;
|
|
|
99
102
|
|
|
100
103
|
declare const AccordionItem: (props: AccordionItemProps) => JSX.Element;
|
|
101
104
|
|
|
105
|
+
type Color = 'blue' | 'gray' | 'red' | 'pink' | 'green' | 'orange' | 'purple' | 'yellow' | 'mediatoolBlue';
|
|
106
|
+
type ColorGrade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
107
|
+
type ColorShades = Record<ColorGrade, string>;
|
|
108
|
+
|
|
109
|
+
interface InputFieldProps {
|
|
110
|
+
inputLeftElement?: React.ReactNode;
|
|
111
|
+
inputRightElement?: React.ReactNode;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
type Size$1 = 'sm' | 'md' | 'lg';
|
|
115
|
+
interface Option {
|
|
116
|
+
label: string;
|
|
117
|
+
value: string;
|
|
118
|
+
}
|
|
119
|
+
interface SelectProps<T, K extends boolean> extends Omit<Props<T, K, GroupBase<T>>, 'onChange' | 'value' | 'isMulti'> {
|
|
120
|
+
/** Whatever is currently selected by the select will be controlled by value prop, if value is
|
|
121
|
+
* of type string then it will automatically pair it up with matching object from options list */
|
|
122
|
+
value?: K extends true ? T[] | string[] : T | string;
|
|
123
|
+
/** Take a look at the second argument, the event,
|
|
124
|
+
* for info as to which specific element was added */
|
|
125
|
+
onChange?: (option: K extends true ? MultiValue<T> : SingleValue<T>, event: ActionMeta<T>) => void;
|
|
126
|
+
onAdd?: (val: unknown) => void;
|
|
127
|
+
onRemove?: (val: unknown) => void;
|
|
128
|
+
/** Used for accessibility */
|
|
129
|
+
name?: string;
|
|
130
|
+
size?: Size$1;
|
|
131
|
+
'data-testid'?: string;
|
|
132
|
+
loadingList?: ComponentType<MenuListProps<T, K, GroupBase<T>>> | undefined;
|
|
133
|
+
/** Custom icon that will be put to the faremost right of the component */
|
|
134
|
+
icon?: ComponentType<any>;
|
|
135
|
+
/** Custom icon that will be put to the faremost left of the component */
|
|
136
|
+
leftIcon?: ComponentType<any>;
|
|
137
|
+
customOption?: ((option: T) => JSX.Element) | null;
|
|
138
|
+
isMulti?: K;
|
|
139
|
+
ref?: Ref<SelectInstance<T, K, GroupBase<T>>>;
|
|
140
|
+
}
|
|
141
|
+
type SelectFieldProps<T, K extends boolean = false> = SelectProps<T, K> & Omit<InputFieldProps, 'isMulti'> & {
|
|
142
|
+
direction?: StackDirection;
|
|
143
|
+
name: string;
|
|
144
|
+
label: string;
|
|
145
|
+
validate?: RegisterOptions;
|
|
146
|
+
isRequired?: boolean;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Select component that provides a customizable and accessible select input.
|
|
151
|
+
* It is built on top of Chakra UI and Chakra React Select components.
|
|
152
|
+
*
|
|
153
|
+
* @see SearchBar
|
|
154
|
+
* @see {@link https://northlight.dev/reference/select}
|
|
155
|
+
*
|
|
156
|
+
* @example (Example)
|
|
157
|
+
* ## Single Select
|
|
158
|
+
* (?
|
|
159
|
+
* <Select
|
|
160
|
+
* options={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]}
|
|
161
|
+
* onChange={(value, action) => console.log('Selected:', value)}
|
|
162
|
+
* />
|
|
163
|
+
* ?)
|
|
164
|
+
*
|
|
165
|
+
* @example (Example)
|
|
166
|
+
* ## Clearable Select
|
|
167
|
+
* (?
|
|
168
|
+
* <Select
|
|
169
|
+
* options={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]}
|
|
170
|
+
* onChange={(value, action) => console.log('Selected:', value)}
|
|
171
|
+
* isClearable={ true }
|
|
172
|
+
* />
|
|
173
|
+
* ?)
|
|
174
|
+
*
|
|
175
|
+
* @example (Example)
|
|
176
|
+
* ## Multi select
|
|
177
|
+
* (?
|
|
178
|
+
* <Select
|
|
179
|
+
* options={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]}
|
|
180
|
+
* onChange={(value, action) => console.log('Selected:', value)}
|
|
181
|
+
* isMulti
|
|
182
|
+
* />
|
|
183
|
+
* ?)
|
|
184
|
+
*
|
|
185
|
+
* @example (Example)
|
|
186
|
+
* ## Event meta
|
|
187
|
+
* _There is a second argument passed to the handlechange that can be useful
|
|
188
|
+
* for knowing which elements where adding/removed_
|
|
189
|
+
* (?
|
|
190
|
+
* () => {
|
|
191
|
+
* const handleChange = (val, e) => {
|
|
192
|
+
switch (e.action) {
|
|
193
|
+
case 'select-option':
|
|
194
|
+
//on add value
|
|
195
|
+
console.log(e.option)
|
|
196
|
+
break
|
|
197
|
+
case 'pop-value':
|
|
198
|
+
//on remove value
|
|
199
|
+
console.log(e.removedValue.categoryKey)
|
|
200
|
+
break
|
|
201
|
+
default:
|
|
202
|
+
break
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
* return <Select onChange={handleChange} options={[{label: '1', value: '1'}]} isMulti={true}/>
|
|
206
|
+
*
|
|
207
|
+
* }
|
|
208
|
+
* ?)
|
|
209
|
+
*
|
|
210
|
+
* @example (Example)
|
|
211
|
+
* ##Customizing
|
|
212
|
+
* There are two special props for easy customization
|
|
213
|
+
* * customOption
|
|
214
|
+
* * customTag
|
|
215
|
+
*
|
|
216
|
+
* This are themselves react components
|
|
217
|
+
* (?
|
|
218
|
+
+const customOption = ({ label }) => (
|
|
219
|
+
<HStack>
|
|
220
|
+
<Avatar name={label} />
|
|
221
|
+
<P>{label}</P>
|
|
222
|
+
</HStack>
|
|
223
|
+
);
|
|
224
|
+
|
|
225
|
+
const customTag = ({ label }) => {
|
|
226
|
+
const [ isIncluded, setIsIncluded ] = useState(true)
|
|
227
|
+
const toggle = () => setIsIncluded((prev) => !prev)
|
|
228
|
+
|
|
229
|
+
return (
|
|
230
|
+
<Flex>
|
|
231
|
+
<Button
|
|
232
|
+
size="xs"
|
|
233
|
+
onClick={ toggle }
|
|
234
|
+
onMouseDown={ (e) => e.stopPropagation() }
|
|
235
|
+
>
|
|
236
|
+
{ isIncluded ? 'Include' : 'Exclude' }
|
|
237
|
+
</Button>
|
|
238
|
+
<Tag>{ label }</Tag>
|
|
239
|
+
</Flex>
|
|
240
|
+
)
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
const CustomSelect = () => (
|
|
244
|
+
<Select
|
|
245
|
+
customOption={customOption}
|
|
246
|
+
customTag={ customTag }
|
|
247
|
+
isMulti={true}
|
|
248
|
+
options={[
|
|
249
|
+
{ label: 'Option 1', value: '1' },
|
|
250
|
+
{ label: 'Option 2', value: '2' },
|
|
251
|
+
]}
|
|
252
|
+
|
|
253
|
+
/>
|
|
254
|
+
);
|
|
255
|
+
|
|
256
|
+
render(<CustomSelect />);
|
|
257
|
+
*
|
|
258
|
+
* ?)
|
|
259
|
+
*
|
|
260
|
+
*
|
|
261
|
+
* @example (Example)
|
|
262
|
+
* ## Testing
|
|
263
|
+
* You can grab the test id for the select by
|
|
264
|
+
* **screen.getByTestId('custom-testid)
|
|
265
|
+
* .children[0].children[2].children[0].children[1].children[0]**
|
|
266
|
+
* (?
|
|
267
|
+
* <Select
|
|
268
|
+
* data-testid="custom-test-id"
|
|
269
|
+
* />
|
|
270
|
+
* ?)
|
|
271
|
+
*/
|
|
272
|
+
declare const Select: <T extends Option, K extends boolean = false>(props: SelectProps<T, K> & React__default.RefAttributes<SelectInstance<T, K, GroupBase<T>>>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
273
|
+
|
|
274
|
+
declare function SelectField<T extends Option, K extends boolean = false>({ name, label, options, direction, isMulti, isRequired, validate, isClearable, onChange: onChangeCallback, inputLeftElement, inputRightElement, ...rest }: SelectFieldProps<T, K>): JSX.Element;
|
|
275
|
+
|
|
276
|
+
declare const getMatchingValue: <T extends Option, K extends boolean>(value: (K extends true ? string[] | T[] : string | T) | undefined, options: react_select.OptionsOrGroups<T, react_select.GroupBase<T>> | undefined) => T | T[] | undefined;
|
|
277
|
+
|
|
278
|
+
interface TagsInputProps<T> extends Omit<SelectProps<T, true>, 'value' | 'formatCreateLabel' | 'isValidNewOption' | 'onAdd' | 'onRemove' | 'leftIcon' | 'icon' | 'customOption'> {
|
|
279
|
+
value?: MultiValue<T>;
|
|
280
|
+
formatCreateLabel?: (textInputValue: string) => string;
|
|
281
|
+
isValidNewOption?: (option: string, selectOptions: MultiValue<T>) => boolean;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Tags Input, based of react creatable select, is meant to select
|
|
286
|
+
* multiple tags. Follows styling of textarea and is resizable.
|
|
287
|
+
*
|
|
288
|
+
* @see {@link https://northlight.dev/reference/tags-input}
|
|
289
|
+
* @example (Example)
|
|
290
|
+
* ## Simple
|
|
291
|
+
* (?
|
|
292
|
+
* <TagsInput />
|
|
293
|
+
* ?)
|
|
294
|
+
*
|
|
295
|
+
* @example (Example)
|
|
296
|
+
* ## With suggestions
|
|
297
|
+
* (?
|
|
298
|
+
* <TagsInput options={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]}/>
|
|
299
|
+
* ?)
|
|
300
|
+
*
|
|
301
|
+
*/
|
|
302
|
+
declare function TagsInput<T extends Option>({ options, onChange, isLoading, loadingList, 'data-testid': testId, value, ...rest }: TagsInputProps<T>): JSX.Element;
|
|
303
|
+
|
|
102
304
|
interface OrganizationLogoProps extends AvatarProps$1 {
|
|
103
305
|
name: string;
|
|
104
306
|
image?: string;
|
|
@@ -160,7 +362,7 @@ interface AvatarGroupProps extends StackProps {
|
|
|
160
362
|
* @example (Example)
|
|
161
363
|
* Avatar takes a name and image
|
|
162
364
|
* (?
|
|
163
|
-
* <Avatar name="Anakin Skywalker" image='
|
|
365
|
+
* <Avatar name="Anakin Skywalker" image='src/assets/avatars/vader.png' />
|
|
164
366
|
* ?)
|
|
165
367
|
*
|
|
166
368
|
* <br />
|
|
@@ -189,7 +391,7 @@ declare const Avatar: ({ variant, notificationCount, name, image, size, ...rest
|
|
|
189
391
|
{[1, 2, 3, 4, 5].map((i) => (
|
|
190
392
|
<Avatar
|
|
191
393
|
name="Anakin Skywalker"
|
|
192
|
-
image="
|
|
394
|
+
image="src/assets/avatars/trooper.png"
|
|
193
395
|
size="sm"
|
|
194
396
|
variant="rounded"
|
|
195
397
|
key={ i }
|
|
@@ -248,9 +450,12 @@ interface BlinkerProps {
|
|
|
248
450
|
declare const Blinker: ({ color, size, isBlinking, ...rest }: BlinkerProps) => JSX.Element;
|
|
249
451
|
|
|
250
452
|
type ButtonVariants = 'default' | 'danger' | 'success' | 'brand' | 'brandSubdued' | 'link' | 'ghost';
|
|
251
|
-
|
|
453
|
+
type ButtonProps<As extends React.ElementType> = Omit<ButtonProps$1, 'as'> & GenericAsProps<As> & {
|
|
252
454
|
variant?: ButtonVariants;
|
|
253
|
-
}
|
|
455
|
+
};
|
|
456
|
+
type GenericAsProps<As extends React.ElementType> = ({
|
|
457
|
+
as?: As;
|
|
458
|
+
} & ComponentProps<As>);
|
|
254
459
|
|
|
255
460
|
/**
|
|
256
461
|
* @see {@link https://northlight.dev/reference/button}
|
|
@@ -296,7 +501,11 @@ interface ButtonProps extends ButtonProps$1 {
|
|
|
296
501
|
* render(<ExampleButton/>)
|
|
297
502
|
* ?)
|
|
298
503
|
*/
|
|
299
|
-
declare const Button:
|
|
504
|
+
declare const Button: <As extends React__default.ElementType<any> = _chakra_ui_system_dist_system_types.ComponentWithAs<"button", _chakra_ui_button_dist_button.ButtonProps>>(props: Omit<_chakra_ui_button_dist_button.ButtonProps, "as"> & {
|
|
505
|
+
as?: As | undefined;
|
|
506
|
+
} & React__default.ComponentProps<As> & {
|
|
507
|
+
variant?: ButtonVariants | undefined;
|
|
508
|
+
} & React__default.RefAttributes<unknown>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
300
509
|
|
|
301
510
|
type CheckboxVariants = 'default' | 'rounded';
|
|
302
511
|
interface CheckboxProps extends Omit<CheckboxProps$1, 'value'> {
|
|
@@ -312,7 +521,7 @@ interface CheckboxFieldProps extends CheckboxProps$1 {
|
|
|
312
521
|
variant?: CheckboxVariants;
|
|
313
522
|
direction?: StackDirection;
|
|
314
523
|
labelPlacement?: 'left' | 'right';
|
|
315
|
-
labelSize?: '2xs' | 'xs' | 'md' | 'lg';
|
|
524
|
+
labelSize?: '2xs' | 'xs' | 'sm' | 'md' | 'lg';
|
|
316
525
|
}
|
|
317
526
|
|
|
318
527
|
/**
|
|
@@ -621,15 +830,6 @@ declare const FlipButtonGroup: (props: FlipButtonGroupProps) => JSX.Element;
|
|
|
621
830
|
*/
|
|
622
831
|
declare const FlipButtonGroupField: ({ name, label, children, direction, isRequired, iconPlacement, onChange: onChangeCallback, validate, ...rest }: FlipButtonGroupFieldProps) => JSX.Element;
|
|
623
832
|
|
|
624
|
-
type Color = 'blue' | 'gray' | 'red' | 'pink' | 'green' | 'orange' | 'purple' | 'yellow' | 'mediatoolBlue';
|
|
625
|
-
type ColorGrade = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
626
|
-
type ColorShades = Record<ColorGrade, string>;
|
|
627
|
-
|
|
628
|
-
interface InputFieldProps {
|
|
629
|
-
inputLeftElement?: React.ReactNode;
|
|
630
|
-
inputRightElement?: React.ReactNode;
|
|
631
|
-
}
|
|
632
|
-
|
|
633
833
|
interface DateRange {
|
|
634
834
|
startDate: string;
|
|
635
835
|
endDate: string;
|
|
@@ -807,6 +1007,7 @@ declare const DatePickerField: ({ name, minValue, maxValue, isRequired, directio
|
|
|
807
1007
|
declare const DateRangePickerField: ({ name, minValue, maxValue, isRequired, direction, label, validate, firstDayOfWeek, onChange: onChangeCallback, isClearable, ...rest }: DateRangePickerFieldProps) => JSX.Element;
|
|
808
1008
|
|
|
809
1009
|
interface ToolboxProps extends Omit<FlexProps, 'direction'> {
|
|
1010
|
+
isResizable?: boolean;
|
|
810
1011
|
isOpen: boolean;
|
|
811
1012
|
/** where the toolbox pops in from */
|
|
812
1013
|
direction?: 'right' | 'left';
|
|
@@ -843,7 +1044,7 @@ interface ToolboxFooterProps extends FlexProps {
|
|
|
843
1044
|
<Button onClick={ onOpen } w="full">
|
|
844
1045
|
Open Toolbox
|
|
845
1046
|
</Button>
|
|
846
|
-
<Toolbox isOpen={ isOpen } onClose={ onClose } size="
|
|
1047
|
+
<Toolbox isOpen={ isOpen } onClose={ onClose } size="sm">
|
|
847
1048
|
<ToolboxHeader>Title</ToolboxHeader>
|
|
848
1049
|
<ToolboxContent>
|
|
849
1050
|
<Stack>
|
|
@@ -861,7 +1062,7 @@ interface ToolboxFooterProps extends FlexProps {
|
|
|
861
1062
|
}
|
|
862
1063
|
* ?)
|
|
863
1064
|
*/
|
|
864
|
-
declare const Toolbox: ({ isOpen, children, direction, shouldPush, size,
|
|
1065
|
+
declare const Toolbox: ({ isResizable, isOpen, children, direction, shouldPush, size, onClose, autoFocus, ...rest }: ToolboxProps) => JSX.Element;
|
|
865
1066
|
|
|
866
1067
|
/**
|
|
867
1068
|
* @see Toolbox
|
|
@@ -988,7 +1189,7 @@ render(<MyCarousel/>)
|
|
|
988
1189
|
*/
|
|
989
1190
|
declare const Carousel: ({ children, showArrows, showRadio, value: controlledIndex, onChange, itemWidth, itemHeight, spacing, carouselStyles, ...rest }: CarouselProps) => JSX.Element;
|
|
990
1191
|
|
|
991
|
-
type Size
|
|
1192
|
+
type Size = 'sm' | 'md' | 'lg';
|
|
992
1193
|
interface SearchBarOptionType {
|
|
993
1194
|
label: string;
|
|
994
1195
|
value: any;
|
|
@@ -999,7 +1200,7 @@ interface SearchBarProps<T extends SearchBarOptionType, K extends boolean = fals
|
|
|
999
1200
|
onChange?: (val: any, event: ActionMeta<T>) => void;
|
|
1000
1201
|
onAdd?: (val: unknown) => void;
|
|
1001
1202
|
onRemove?: (val: unknown) => void;
|
|
1002
|
-
size?: Size
|
|
1203
|
+
size?: Size;
|
|
1003
1204
|
'data-testid'?: string;
|
|
1004
1205
|
debouncedWaitTime?: number;
|
|
1005
1206
|
clearInputOnSelect?: boolean;
|
|
@@ -1748,7 +1949,7 @@ interface IconProps extends IconProps$1 {
|
|
|
1748
1949
|
* <Icon as={SmileyDuo} size="lg" />
|
|
1749
1950
|
* ?)
|
|
1750
1951
|
*/
|
|
1751
|
-
declare const Icon: _chakra_ui_system_dist_system_types.ComponentWithAs<_chakra_ui_system_dist_system_types.As
|
|
1952
|
+
declare const Icon: _chakra_ui_system_dist_system_types.ComponentWithAs<_chakra_ui_system_dist_system_types.As, IconProps>;
|
|
1752
1953
|
|
|
1753
1954
|
interface IconButtonProps extends IconButtonProps$1 {
|
|
1754
1955
|
variant?: ButtonVariants;
|
|
@@ -2439,167 +2640,6 @@ declare const RadioGroup: ({ direction, children, name, ...rest }: RadioGroupPro
|
|
|
2439
2640
|
*/
|
|
2440
2641
|
declare const RadioGroupField: ({ name, label, children, direction, isRequired, validate, onChange: onChangeCallback, ...rest }: RadioFieldGroupProps) => JSX.Element;
|
|
2441
2642
|
|
|
2442
|
-
type Size = 'sm' | 'md' | 'lg';
|
|
2443
|
-
interface Option {
|
|
2444
|
-
label: string;
|
|
2445
|
-
value: string;
|
|
2446
|
-
}
|
|
2447
|
-
interface SelectProps<T, K extends boolean> extends Omit<Props<T, K, GroupBase<T>>, 'onChange' | 'value' | 'isMulti'> {
|
|
2448
|
-
/** Whatever is currently selected by the select will be controlled by value prop */
|
|
2449
|
-
value?: Option | Option[];
|
|
2450
|
-
/** Take a look at the second argument, the event,
|
|
2451
|
-
* for info as to which specific element was added */
|
|
2452
|
-
onChange?: (option: K extends true ? MultiValue<T> : SingleValue<T>, event: ActionMeta<T>) => void;
|
|
2453
|
-
onAdd?: (val: unknown) => void;
|
|
2454
|
-
onRemove?: (val: unknown) => void;
|
|
2455
|
-
/** Used for accessibility */
|
|
2456
|
-
name?: string;
|
|
2457
|
-
size?: Size;
|
|
2458
|
-
'data-testid'?: string;
|
|
2459
|
-
loadingList?: ComponentType<MenuListProps<T, K, GroupBase<T>>> | undefined;
|
|
2460
|
-
/** Custom icon that will be put to the faremost right of the component */
|
|
2461
|
-
icon?: ComponentType<any>;
|
|
2462
|
-
/** Custom icon that will be put to the faremost left of the component */
|
|
2463
|
-
leftIcon?: ComponentType<any>;
|
|
2464
|
-
customOption?: ((option: T) => JSX.Element) | null;
|
|
2465
|
-
isMulti?: K;
|
|
2466
|
-
ref?: Ref<SelectInstance<T, K, GroupBase<T>>>;
|
|
2467
|
-
}
|
|
2468
|
-
type SelectFieldProps<T, K extends boolean = false> = SelectProps<T, K> & Omit<InputFieldProps, 'isMulti'> & {
|
|
2469
|
-
direction?: StackDirection;
|
|
2470
|
-
name: string;
|
|
2471
|
-
label: string;
|
|
2472
|
-
validate?: RegisterOptions;
|
|
2473
|
-
isRequired?: boolean;
|
|
2474
|
-
};
|
|
2475
|
-
|
|
2476
|
-
/**
|
|
2477
|
-
* Select component that provides a customizable and accessible select input.
|
|
2478
|
-
* It is built on top of Chakra UI and Chakra React Select components.
|
|
2479
|
-
*
|
|
2480
|
-
* @see SearchBar
|
|
2481
|
-
* @see {@link https://northlight.dev/reference/select}
|
|
2482
|
-
*
|
|
2483
|
-
* @example (Example)
|
|
2484
|
-
* ## Single Select
|
|
2485
|
-
* (?
|
|
2486
|
-
* <Select
|
|
2487
|
-
* options={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]}
|
|
2488
|
-
* onChange={(value, action) => console.log('Selected:', value)}
|
|
2489
|
-
* />
|
|
2490
|
-
* ?)
|
|
2491
|
-
*
|
|
2492
|
-
* @example (Example)
|
|
2493
|
-
* ## Clearable Select
|
|
2494
|
-
* (?
|
|
2495
|
-
* <Select
|
|
2496
|
-
* options={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]}
|
|
2497
|
-
* onChange={(value, action) => console.log('Selected:', value)}
|
|
2498
|
-
* isClearable={ true }
|
|
2499
|
-
* />
|
|
2500
|
-
* ?)
|
|
2501
|
-
*
|
|
2502
|
-
* @example (Example)
|
|
2503
|
-
* ## Multi select
|
|
2504
|
-
* (?
|
|
2505
|
-
* <Select
|
|
2506
|
-
* options={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]}
|
|
2507
|
-
* onChange={(value, action) => console.log('Selected:', value)}
|
|
2508
|
-
* isMulti
|
|
2509
|
-
* />
|
|
2510
|
-
* ?)
|
|
2511
|
-
*
|
|
2512
|
-
* @example (Example)
|
|
2513
|
-
* ## Event meta
|
|
2514
|
-
* _There is a second argument passed to the handlechange that can be useful
|
|
2515
|
-
* for knowing which elements where adding/removed_
|
|
2516
|
-
* (?
|
|
2517
|
-
* () => {
|
|
2518
|
-
* const handleChange = (val, e) => {
|
|
2519
|
-
switch (e.action) {
|
|
2520
|
-
case 'select-option':
|
|
2521
|
-
//on add value
|
|
2522
|
-
console.log(e.option)
|
|
2523
|
-
break
|
|
2524
|
-
case 'pop-value':
|
|
2525
|
-
//on remove value
|
|
2526
|
-
console.log(e.removedValue.categoryKey)
|
|
2527
|
-
break
|
|
2528
|
-
default:
|
|
2529
|
-
break
|
|
2530
|
-
}
|
|
2531
|
-
}
|
|
2532
|
-
* return <Select onChange={handleChange} options={[{label: '1', value: '1'}]} isMulti={true}/>
|
|
2533
|
-
*
|
|
2534
|
-
* }
|
|
2535
|
-
* ?)
|
|
2536
|
-
*
|
|
2537
|
-
* @example (Example)
|
|
2538
|
-
* ##Customizing
|
|
2539
|
-
* There are two special props for easy customization
|
|
2540
|
-
* * customOption
|
|
2541
|
-
* * customTag
|
|
2542
|
-
*
|
|
2543
|
-
* This are themselves react components
|
|
2544
|
-
* (?
|
|
2545
|
-
+const customOption = ({ label }) => (
|
|
2546
|
-
<HStack>
|
|
2547
|
-
<Avatar name={label} />
|
|
2548
|
-
<P>{label}</P>
|
|
2549
|
-
</HStack>
|
|
2550
|
-
);
|
|
2551
|
-
|
|
2552
|
-
const customTag = ({ label }) => {
|
|
2553
|
-
const [ isIncluded, setIsIncluded ] = useState(true)
|
|
2554
|
-
const toggle = () => setIsIncluded((prev) => !prev)
|
|
2555
|
-
|
|
2556
|
-
return (
|
|
2557
|
-
<Flex>
|
|
2558
|
-
<Button
|
|
2559
|
-
size="xs"
|
|
2560
|
-
onClick={ toggle }
|
|
2561
|
-
onMouseDown={ (e) => e.stopPropagation() }
|
|
2562
|
-
>
|
|
2563
|
-
{ isIncluded ? 'Include' : 'Exclude' }
|
|
2564
|
-
</Button>
|
|
2565
|
-
<Tag>{ label }</Tag>
|
|
2566
|
-
</Flex>
|
|
2567
|
-
)
|
|
2568
|
-
}
|
|
2569
|
-
|
|
2570
|
-
const CustomSelect = () => (
|
|
2571
|
-
<Select
|
|
2572
|
-
customOption={customOption}
|
|
2573
|
-
customTag={ customTag }
|
|
2574
|
-
isMulti={true}
|
|
2575
|
-
options={[
|
|
2576
|
-
{ label: 'Option 1', value: '1' },
|
|
2577
|
-
{ label: 'Option 2', value: '2' },
|
|
2578
|
-
]}
|
|
2579
|
-
|
|
2580
|
-
/>
|
|
2581
|
-
);
|
|
2582
|
-
|
|
2583
|
-
render(<CustomSelect />);
|
|
2584
|
-
*
|
|
2585
|
-
* ?)
|
|
2586
|
-
*
|
|
2587
|
-
*
|
|
2588
|
-
* @example (Example)
|
|
2589
|
-
* ## Testing
|
|
2590
|
-
* You can grab the test id for the select by
|
|
2591
|
-
* **screen.getByTestId('custom-testid)
|
|
2592
|
-
* .children[0].children[2].children[0].children[1].children[0]**
|
|
2593
|
-
* (?
|
|
2594
|
-
* <Select
|
|
2595
|
-
* data-testid="custom-test-id"
|
|
2596
|
-
* />
|
|
2597
|
-
* ?)
|
|
2598
|
-
*/
|
|
2599
|
-
declare const Select: <T extends Option, K extends boolean = false>(props: SelectProps<T, K> & React__default.RefAttributes<SelectInstance<T, K, GroupBase<T>>>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
2600
|
-
|
|
2601
|
-
declare function SelectField<T extends Option, K extends boolean = false>({ name, label, options, direction, isMulti, isRequired, validate, isClearable, onChange: onChangeCallback, inputLeftElement, inputRightElement, ...rest }: SelectFieldProps<T, K>): JSX.Element;
|
|
2602
|
-
|
|
2603
2643
|
type SpinnerProps = SpinnerProps$1;
|
|
2604
2644
|
|
|
2605
2645
|
/**
|
|
@@ -2847,13 +2887,92 @@ interface TextFieldProps extends Omit<InputProps, 'onChange'>, InputFieldProps {
|
|
|
2847
2887
|
type MaskedTextInputProps = InputProps & Props$1 & {
|
|
2848
2888
|
maskPlaceholder?: string;
|
|
2849
2889
|
};
|
|
2850
|
-
type
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
}
|
|
2890
|
+
type FormattedNumberInputPreset = 'eu' | 'us' | 'nor';
|
|
2891
|
+
interface PresetOptions {
|
|
2892
|
+
thousandSeparator: string;
|
|
2893
|
+
decimalSeparator: string;
|
|
2894
|
+
}
|
|
2895
|
+
interface FormattedNumberInputProps extends Omit<NumericFormatProps, 'onChange' | 'max' | 'min'> {
|
|
2896
|
+
max?: number;
|
|
2897
|
+
min?: number;
|
|
2898
|
+
/** Changes thousand and decimal separators */
|
|
2899
|
+
preset?: FormattedNumberInputPreset;
|
|
2900
|
+
/** Gives you back an object, see https://s-yadav.github.io/react-number-format/docs/quirks */
|
|
2901
|
+
onChange?: NumericFormatProps['onValueChange'];
|
|
2902
|
+
/** Will format number UI as percentage, but return as decimal value */
|
|
2903
|
+
isPercentage?: boolean;
|
|
2904
|
+
/** Will round up and restrict number of decimals */
|
|
2905
|
+
numberOfDecimals?: number;
|
|
2906
|
+
}
|
|
2907
|
+
interface FormattedNumberInputFieldProps extends FormattedNumberInputProps {
|
|
2908
|
+
name: string;
|
|
2909
|
+
label: string;
|
|
2910
|
+
validate?: RegisterOptions;
|
|
2911
|
+
isRequired?: boolean;
|
|
2912
|
+
direction?: StackDirection;
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
/**
|
|
2916
|
+
* @see {@link https://northlight.dev/reference/formatted-number-input-field}
|
|
2917
|
+
@example (Example)
|
|
2918
|
+
* The formatted number input is built uppon react-number-format
|
|
2919
|
+
* It formats numbers by adjusting thousand and decimal separators
|
|
2920
|
+
* ex : 22345351.34234 => 222 453 51,34234
|
|
2921
|
+
* It comes with three presets: eu, us and nor.
|
|
2922
|
+
* These have the following separators:
|
|
2923
|
+
(?
|
|
2924
|
+
<FormattedNumberInput
|
|
2925
|
+
preset="us"
|
|
2926
|
+
onChange={(values) => console.log(values.floatValue)}
|
|
2927
|
+
isPercentage={true}
|
|
2928
|
+
max={1E9}
|
|
2929
|
+
min={0}
|
|
2930
|
+
/>
|
|
2931
|
+
?)
|
|
2932
|
+
|
|
2933
|
+
@example (Example)
|
|
2934
|
+
### Nor preset
|
|
2935
|
+
(?
|
|
2936
|
+
<FormattedNumberInput
|
|
2937
|
+
preset="nor"
|
|
2938
|
+
onChange={(values) => console.log(values.floatValue)}
|
|
2939
|
+
value={320341345102.34134}
|
|
2940
|
+
numberOfDecimals={5}
|
|
2941
|
+
/>
|
|
2942
|
+
?)
|
|
2943
|
+
|
|
2944
|
+
@example (Example)
|
|
2945
|
+
### Eu preset
|
|
2946
|
+
(?
|
|
2947
|
+
<FormattedNumberInput
|
|
2948
|
+
preset="eu"
|
|
2949
|
+
onChange={(values) => console.log(values.floatValue)}
|
|
2950
|
+
value={320341345102.34134}
|
|
2951
|
+
numberOfDecimals={5}
|
|
2952
|
+
/>
|
|
2953
|
+
?)
|
|
2855
2954
|
|
|
2856
|
-
|
|
2955
|
+
*/
|
|
2956
|
+
declare const FormattedNumberInput: ({ preset, isPercentage, onChange, value, numberOfDecimals, max, min, ...rest }: FormattedNumberInputProps) => JSX.Element;
|
|
2957
|
+
|
|
2958
|
+
/**
|
|
2959
|
+
* The formatted number input component wrapped in a <Field />
|
|
2960
|
+
* meant to be used only inside <Form />
|
|
2961
|
+
* @see FormattedNumberInput
|
|
2962
|
+
* @see {@link https://northlight.dev/reference/formatted-number-input-field}
|
|
2963
|
+
* @example (Example)
|
|
2964
|
+
* (?
|
|
2965
|
+
* <Form initialValues={{money: ''}}>
|
|
2966
|
+
* <FormattedNumberInputField
|
|
2967
|
+
* name="money"
|
|
2968
|
+
* label="How much money is currently on your account"
|
|
2969
|
+
* labelPosition="left"
|
|
2970
|
+
* />
|
|
2971
|
+
* </Form>
|
|
2972
|
+
* ?)
|
|
2973
|
+
*
|
|
2974
|
+
*/
|
|
2975
|
+
declare const FormattedNumberInputField: ({ name, label, isRequired, validate, onChange: onChangeCallback, direction, ...rest }: FormattedNumberInputFieldProps) => JSX.Element;
|
|
2857
2976
|
|
|
2858
2977
|
declare const MaskedTextInput: ({ mask, maskPlaceholder, alwaysShowMask, name, value, placeholder, onChange, onBlur, ...rest }: MaskedTextInputProps) => JSX.Element;
|
|
2859
2978
|
|
|
@@ -2916,7 +3035,7 @@ declare const Toast: ({ variant, title, description, onClose, ...rest }: ToastPr
|
|
|
2916
3035
|
* )}
|
|
2917
3036
|
* ?)
|
|
2918
3037
|
*/
|
|
2919
|
-
declare const useToast: (defaultOpts?: UseToastOptions) => (opts?: UseToastOptions) =>
|
|
3038
|
+
declare const useToast: (defaultOpts?: UseToastOptions) => (opts?: UseToastOptions) => _chakra_ui_toast_dist_toast_types_24f022fd.a;
|
|
2920
3039
|
|
|
2921
3040
|
type DurationType = number | null;
|
|
2922
3041
|
type OffsetType = number | string;
|
|
@@ -3220,7 +3339,7 @@ You can move up the form state using a ref as well
|
|
|
3220
3339
|
?)
|
|
3221
3340
|
|
|
3222
3341
|
*/
|
|
3223
|
-
declare const Form: <FormValues extends FieldValues>(props: FormProps<FormValues> & React__default.RefAttributes<UseFormReturn$1<FormValues
|
|
3342
|
+
declare const Form: <FormValues extends FieldValues>(props: FormProps<FormValues> & React__default.RefAttributes<UseFormReturn$1<FormValues>>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
3224
3343
|
|
|
3225
3344
|
/**
|
|
3226
3345
|
* Wraps children under form context
|
|
@@ -3481,7 +3600,7 @@ declare const PaneItem: ({ children, ...rest }: GridItemProps) => JSX.Element;
|
|
|
3481
3600
|
* </Box>
|
|
3482
3601
|
* ?)
|
|
3483
3602
|
* */
|
|
3484
|
-
declare const PaneDivider: _chakra_ui_system_dist_system_types.ComponentWithAs<_chakra_ui_system_dist_system_types.As
|
|
3603
|
+
declare const PaneDivider: _chakra_ui_system_dist_system_types.ComponentWithAs<_chakra_ui_system_dist_system_types.As, BoxProps>;
|
|
3485
3604
|
|
|
3486
3605
|
type EditableSizes = 'sm' | 'md' | 'lg';
|
|
3487
3606
|
interface EditableProps extends EditableProps$1 {
|
|
@@ -3528,26 +3647,74 @@ declare const EditableText: ({ size, value: inputValue, onSubmit, leftItem, ...r
|
|
|
3528
3647
|
interface StepStackProps extends StackProps {
|
|
3529
3648
|
children: ReactNode | ReactNode[];
|
|
3530
3649
|
rowHeight?: string;
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3650
|
+
/** The vertical alignment of the circles.
|
|
3651
|
+
* Accepts any values that can be used with the alignItems CSS property.
|
|
3652
|
+
* Defaults to "center".
|
|
3653
|
+
*/
|
|
3654
|
+
stepCircleAlignment?: string;
|
|
3655
|
+
/** Margin top for circles in pixels.
|
|
3656
|
+
* Useful for nonsymmetrical layouts.
|
|
3657
|
+
* Defaults to 0.
|
|
3658
|
+
*/
|
|
3659
|
+
stepCircleMarginTopPx?: number;
|
|
3660
|
+
}
|
|
3661
|
+
|
|
3662
|
+
/**
|
|
3663
|
+
Util wrapper for creating ordered vertical layouts by stack
|
|
3664
|
+
@see {@link https://northlight.dev/reference/step-stack}
|
|
3665
|
+
@example
|
|
3666
|
+
The component takes all the props that a normal stack takes, with the addition of a
|
|
3667
|
+
rowHeight prop, which is needed to get the correct height for the grey
|
|
3545
3668
|
line that goes between the steps. Any valid css height unit, px, rem, %,
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3669
|
+
and tokens xs, sm are valid input for the <Code>rowHeight</Code> prop,
|
|
3670
|
+
for example, <Code>rowHeight="3rem"</Code>.
|
|
3671
|
+
<br /><br />
|
|
3672
|
+
## Simple step stack
|
|
3673
|
+
(?
|
|
3674
|
+
<StepStack maxW="sm" spacing="4" rowHeight="10">
|
|
3675
|
+
{ Array.from({length: 5}, (_, i) => i).map((i) => <Input key={ i } />) }
|
|
3676
|
+
</StepStack>
|
|
3677
|
+
?)
|
|
3678
|
+
<br />
|
|
3679
|
+
## Example with flex-start stepCircleAlignment prop
|
|
3680
|
+
(?
|
|
3681
|
+
<StepStack
|
|
3682
|
+
maxW="sm"
|
|
3683
|
+
spacing="4"
|
|
3684
|
+
rowHeight="10"
|
|
3685
|
+
stepCircleAlignment="flex-start"
|
|
3686
|
+
stepCircleMarginTopPx={ 40 }
|
|
3687
|
+
>
|
|
3688
|
+
{ Array.from({ length: 5 }, (_, i) => i).map((i) => (
|
|
3689
|
+
<VStack key={ i }>
|
|
3690
|
+
<Center
|
|
3691
|
+
width={ 400 }
|
|
3692
|
+
height={ 24 }
|
|
3693
|
+
borderRadius={ 10 }
|
|
3694
|
+
backgroundColor="blue.500"
|
|
3695
|
+
color="white"
|
|
3696
|
+
>
|
|
3697
|
+
<VStack spacing="5">
|
|
3698
|
+
<Text>Step { i + 1 }</Text>
|
|
3699
|
+
</VStack>
|
|
3700
|
+
</Center>
|
|
3701
|
+
<Center
|
|
3702
|
+
width={ 400 }
|
|
3703
|
+
height={ 36 }
|
|
3704
|
+
borderRadius={ 10 }
|
|
3705
|
+
backgroundColor="green.500"
|
|
3706
|
+
color="white"
|
|
3707
|
+
>
|
|
3708
|
+
<VStack spacing="5">
|
|
3709
|
+
<Text>Some information</Text>
|
|
3710
|
+
</VStack>
|
|
3711
|
+
</Center>
|
|
3712
|
+
</VStack>
|
|
3713
|
+
)) }
|
|
3714
|
+
</StepStack>
|
|
3715
|
+
?)
|
|
3716
|
+
*/
|
|
3717
|
+
declare const StepStack: ({ children, spacing, rowHeight, stepCircleAlignment, stepCircleMarginTopPx, ...rest }: StepStackProps) => JSX.Element;
|
|
3551
3718
|
|
|
3552
3719
|
declare const useDebounce: <T>(value: T, delay: number) => T;
|
|
3553
3720
|
|
|
@@ -3599,4 +3766,4 @@ declare const useDidUpdateEffect: (effect: EffectCallback, dependencies: Depende
|
|
|
3599
3766
|
declare const theme: Record<string, any>;
|
|
3600
3767
|
declare const tottTheme: Record<string, any>;
|
|
3601
3768
|
|
|
3602
|
-
export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert, AlertProps, AlertVariants, AspectRatio, AsyncError, AsyncErrorProps, Avatar, AvatarBadgeProps, AvatarGroup, AvatarGroupProps, AvatarProps, Badge, BasicOption, Blinker, BlinkerProps, BlockVariant, BlockVariantColorTuple, Blockquote, BodyType, Button, ButtonProps, ButtonVariants, Capitalized, Carousel, Checkbox, CheckboxField, CheckboxFieldProps, CheckboxProps, CheckboxVariants, ChildrenType, Clickable, ClickableProps, ClipboardInput, ClipboardInputProps, Collapse, CollapseProps, Color, ColorButtonProps, ColorGrade, ColorPicker, ColorPickerField, ColorPickerFieldProps, ColorPickerProps, ColorShades, ColorsExpandButtonProps, ConfirmDeleteModalProps, CurrentTheme, CustomContainerPropsType, CustomElementType, CustomFlipButtonProps, CustomFlipButtonPropsType, CustomTheme, DatePicker, DatePickerField, DatePickerFieldProps, DatePickerProps, DateRange, DateRangePicker, DateRangePickerField, DateRangePickerFieldProps, DateRangePickerProps, DragAndDrop, DragHandle, DragHandleProps, DragItem, DragItemProps, Draggable, DraggableProps, DropZone, DropZoneProps, Droppable, DroppableProps, DurationType, EditableControlsProps, EditableProps, EditableSizes, EditableText, Fade, FadeProps, FastGrid, FastGridProps, FastList, FastListProps, Field, FieldErrorType, FieldProps, FileEditorModalProps, FileFormat, FileIconButtonProps, FileItemProps, FilePicker, FilePickerField, FilePickerFieldProps, FilePickerProps, FileWithSizeAndType, FileWithSrcNameType, FileWithType, FlipButton, FlipButtonGroup, FlipButtonGroupField, FlipButtonGroupFieldProps, FlipButtonGroupProps, FlipButtonProps, Form, FormBody, FormLabel, FormLabelProps, FormProps, FormattedNumberInput, FormattedNumberInputProps, H1, H2, H3, H4, H5, H6, HeadingProps, HeadingType, Icon, IconButton, IconButtonProps, IconProps, InputFieldProps, Label, LabelProps, LabelSizes, LabelType, Lead, ListenersType, MaskedTextInput, MaskedTextInputProps, MediatoolThemeProvider, MediatoolThemeProviderProps, Message, Modal, ModalBase, ModalBooleans, ModalProps, ModalSizes, MultiFileList, MultiFileListProps, MultiFilePicker, MultiFilePickerField, MultiFilePickerFieldProps, MultiFilePickerProps, MultiFileUploader, MultiFileUploaderProps, MultiItemType, MultiSort, MultiSortProps, NotificationIconButton, NotificationIconButtonProps, NumberInput, NumberInputField, NumberInputFieldProps, NumberInputProps, NumberInputSizeProps, NumberInputStepperProps, OffsetType, Option, OrganizationLogo, OrganizationLogoProps, OverflowGroup, OverflowGroupProps, OverflowIndicatorProps, P, PProps, PaneDivider, PaneItem, PinInput, PinInputProps, PinSize, PinSizeTuple, PinVariant, ProgressBar, Radio, RadioFieldGroupProps, RadioFieldProps, RadioGroup, RadioGroupField, RadioGroupProps, RadioProps, ScaleFade, ScaleFadeProps, SearchBar, SearchBarField, SearchBarFieldProps, SearchBarOptionType, SearchBarProps, Select, SelectActionMeta, SelectField, SelectFieldProps, SelectProps, SetValueOptionsType, Slide, SlideFade, SlideFadeProps, SlideProps, Small, Sortable, SortableContainer, SortableContainerProps, SortableItem, SortableItemProps, SortableList, SortableListProps, Spinner, SpinnerProps, SplitPane, SplitPaneProps, StatusBlock, StatusBlockProps, StatusPin, StatusPinProps, Step, StepList, StepListProps, StepPanel, StepPanelProps, StepProps, StepStack, Steps, StepsProps, StylizedType, Switch, SwitchField, SwitchFieldProps, SwitchProps, TabPanel, TabPanelProps, Table, TableProps, Tabs, TabsProps, Tag, TagGroup, TagGroupProps, TagProps, TextField, TextFieldProps, TextInputFormatter, TextSizeProps, Textarea, TextareaField, TextareaFieldProps, TextareaProps, Tiny, Toast, ToastProps, Toolbox, ToolboxContent, ToolboxContentProps, ToolboxFooter, ToolboxFooterProps, ToolboxHeader, ToolboxHeaderProps, ToolboxProps, TransitionDirection, UseFormReturn, UseSelectCallbacksProps, UseToastOptions, addAlpha, advancedParseFloat, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useDebounce, useDidUpdateEffect, useLoadingMessage, useOutsideRectClick, useOverflowGroup, useScreenSize, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|
|
3769
|
+
export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert, AlertProps, AlertVariants, AspectRatio, AsyncError, AsyncErrorProps, Avatar, AvatarBadgeProps, AvatarGroup, AvatarGroupProps, AvatarProps, Badge, BasicOption, Blinker, BlinkerProps, BlockVariant, BlockVariantColorTuple, Blockquote, BodyType, Button, ButtonProps, ButtonVariants, Capitalized, Carousel, Checkbox, CheckboxField, CheckboxFieldProps, CheckboxProps, CheckboxVariants, ChildrenType, Clickable, ClickableProps, ClipboardInput, ClipboardInputProps, Collapse, CollapseProps, Color, ColorButtonProps, ColorGrade, ColorPicker, ColorPickerField, ColorPickerFieldProps, ColorPickerProps, ColorShades, ColorsExpandButtonProps, ConfirmDeleteModalProps, CurrentTheme, CustomContainerPropsType, CustomElementType, CustomFlipButtonProps, CustomFlipButtonPropsType, CustomTheme, DatePicker, DatePickerField, DatePickerFieldProps, DatePickerProps, DateRange, DateRangePicker, DateRangePickerField, DateRangePickerFieldProps, DateRangePickerProps, DragAndDrop, DragHandle, DragHandleProps, DragItem, DragItemProps, Draggable, DraggableProps, DropZone, DropZoneProps, Droppable, DroppableProps, DurationType, EditableControlsProps, EditableProps, EditableSizes, EditableText, Fade, FadeProps, FastGrid, FastGridProps, FastList, FastListProps, Field, FieldErrorType, FieldProps, FileEditorModalProps, FileFormat, FileIconButtonProps, FileItemProps, FilePicker, FilePickerField, FilePickerFieldProps, FilePickerProps, FileWithSizeAndType, FileWithSrcNameType, FileWithType, FlipButton, FlipButtonGroup, FlipButtonGroupField, FlipButtonGroupFieldProps, FlipButtonGroupProps, FlipButtonProps, Form, FormBody, FormLabel, FormLabelProps, FormProps, FormattedNumberInput, FormattedNumberInputField, FormattedNumberInputFieldProps, FormattedNumberInputPreset, FormattedNumberInputProps, GenericAsProps, H1, H2, H3, H4, H5, H6, HeadingProps, HeadingType, Icon, IconButton, IconButtonProps, IconProps, InputFieldProps, Label, LabelProps, LabelSizes, LabelType, Lead, ListenersType, MaskedTextInput, MaskedTextInputProps, MediatoolThemeProvider, MediatoolThemeProviderProps, Message, Modal, ModalBase, ModalBooleans, ModalProps, ModalSizes, MultiFileList, MultiFileListProps, MultiFilePicker, MultiFilePickerField, MultiFilePickerFieldProps, MultiFilePickerProps, MultiFileUploader, MultiFileUploaderProps, MultiItemType, MultiSort, MultiSortProps, NotificationIconButton, NotificationIconButtonProps, NumberInput, NumberInputField, NumberInputFieldProps, NumberInputProps, NumberInputSizeProps, NumberInputStepperProps, OffsetType, Option, OrganizationLogo, OrganizationLogoProps, OverflowGroup, OverflowGroupProps, OverflowIndicatorProps, P, PProps, PaneDivider, PaneItem, PinInput, PinInputProps, PinSize, PinSizeTuple, PinVariant, PresetOptions, ProgressBar, Radio, RadioFieldGroupProps, RadioFieldProps, RadioGroup, RadioGroupField, RadioGroupProps, RadioProps, ScaleFade, ScaleFadeProps, SearchBar, SearchBarField, SearchBarFieldProps, SearchBarOptionType, SearchBarProps, Select, SelectActionMeta, SelectField, SelectFieldProps, SelectProps, SetValueOptionsType, Slide, SlideFade, SlideFadeProps, SlideProps, Small, Sortable, SortableContainer, SortableContainerProps, SortableItem, SortableItemProps, SortableList, SortableListProps, Spinner, SpinnerProps, SplitPane, SplitPaneProps, StatusBlock, StatusBlockProps, StatusPin, StatusPinProps, Step, StepList, StepListProps, StepPanel, StepPanelProps, StepProps, StepStack, Steps, StepsProps, StylizedType, Switch, SwitchField, SwitchFieldProps, SwitchProps, TabPanel, TabPanelProps, Table, TableProps, Tabs, TabsProps, Tag, TagGroup, TagGroupProps, TagProps, TagsInput, TagsInputProps, TextField, TextFieldProps, TextInputFormatter, TextSizeProps, Textarea, TextareaField, TextareaFieldProps, TextareaProps, Tiny, Toast, ToastProps, Toolbox, ToolboxContent, ToolboxContentProps, ToolboxFooter, ToolboxFooterProps, ToolboxHeader, ToolboxHeaderProps, ToolboxProps, TransitionDirection, UseFormReturn, UseSelectCallbacksProps, UseToastOptions, addAlpha, advancedParseFloat, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getMatchingValue, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useDebounce, useDidUpdateEffect, useLoadingMessage, useOutsideRectClick, useOverflowGroup, useScreenSize, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|