@northlight/ui 2.22.2 → 2.23.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.ts +109 -2
- package/dist/es/northlight.js +2905 -2764
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +2904 -2762
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +3 -3
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +4 -4
package/dist/es/northlight.d.ts
CHANGED
|
@@ -32,6 +32,8 @@ import { Props as Props$1 } from 'react-input-mask';
|
|
|
32
32
|
import { NumericFormatProps } from 'react-number-format';
|
|
33
33
|
import { Schema } from 'joi';
|
|
34
34
|
import { UseClickableProps } from '@chakra-ui/clickable';
|
|
35
|
+
import { Option as Option$1 } from '@northlight/ui';
|
|
36
|
+
import { Variant } from 'chakra-react-select/dist/types/types';
|
|
35
37
|
import * as _react_types_shared from '@react-types/shared';
|
|
36
38
|
import * as _react_aria_focus from '@react-aria/focus';
|
|
37
39
|
|
|
@@ -3345,7 +3347,7 @@ declare const useToast: (defaultOpts?: UseToastOptions) => (opts?: UseToastOptio
|
|
|
3345
3347
|
type TooltipVariants = 'success' | 'warning' | 'error' | 'info' | 'danger' | 'ai' | 'default' | 'ghost';
|
|
3346
3348
|
interface OurTooltipProps extends TooltipProps {
|
|
3347
3349
|
variant?: TooltipVariants;
|
|
3348
|
-
description?:
|
|
3350
|
+
description?: React.ReactNode;
|
|
3349
3351
|
hasIcon?: boolean;
|
|
3350
3352
|
}
|
|
3351
3353
|
|
|
@@ -3368,6 +3370,29 @@ interface OurTooltipProps extends TooltipProps {
|
|
|
3368
3370
|
* >
|
|
3369
3371
|
* <Badge>NOICON</Badge>
|
|
3370
3372
|
* </Tooltip>
|
|
3373
|
+
* <Tooltip
|
|
3374
|
+
* hasIcon={ false }
|
|
3375
|
+
* description={
|
|
3376
|
+
* <Box>
|
|
3377
|
+
* <Text>
|
|
3378
|
+
* Some text
|
|
3379
|
+
* </Text>
|
|
3380
|
+
* <UnorderedList>
|
|
3381
|
+
* <ListItem>
|
|
3382
|
+
* List item 1
|
|
3383
|
+
* </ListItem>
|
|
3384
|
+
* <ListItem>
|
|
3385
|
+
* List item 2
|
|
3386
|
+
* </ListItem>
|
|
3387
|
+
* <ListItem>
|
|
3388
|
+
* List item 3
|
|
3389
|
+
* </ListItem>
|
|
3390
|
+
* </UnorderedList>
|
|
3391
|
+
* </Box>
|
|
3392
|
+
* }
|
|
3393
|
+
* >
|
|
3394
|
+
* <Badge>With JSX content</Badge>
|
|
3395
|
+
* </Tooltip>
|
|
3371
3396
|
* </HStack>
|
|
3372
3397
|
* ?)
|
|
3373
3398
|
*
|
|
@@ -4110,6 +4135,88 @@ interface StepStackProps extends StackProps {
|
|
|
4110
4135
|
*/
|
|
4111
4136
|
declare const StepStack: ({ children, spacing, rowHeight, stepCircleAlignment, stepCircleMarginTopPx, ...rest }: StepStackProps) => JSX.Element;
|
|
4112
4137
|
|
|
4138
|
+
interface CreationOption extends Option$1 {
|
|
4139
|
+
isCreation: boolean;
|
|
4140
|
+
}
|
|
4141
|
+
interface CreatableSelectDropdownProps {
|
|
4142
|
+
/**
|
|
4143
|
+
* An array of "Option" objects that represents the initial options available in the dropdown.
|
|
4144
|
+
* Each "Option" object must have a "label" and a "value" property (both strings).
|
|
4145
|
+
*/
|
|
4146
|
+
standardOptions: Option$1[];
|
|
4147
|
+
/**
|
|
4148
|
+
* A callback function that is called whenever the selected option changes.
|
|
4149
|
+
* This function receives the newly selected "Option" object as its only argument.
|
|
4150
|
+
*/
|
|
4151
|
+
onOptionChange: (option: Option$1) => void;
|
|
4152
|
+
/**
|
|
4153
|
+
* Optional placeholder text displayed when no option is selected and the dropdown is not focused.
|
|
4154
|
+
* Defaults to 'Select or create...' if not provided.
|
|
4155
|
+
*/
|
|
4156
|
+
initialPlaceholder?: string;
|
|
4157
|
+
/**
|
|
4158
|
+
* Optional placeholder text displayed when the dropdown is
|
|
4159
|
+
* focused and the user is prompted to create a new option.
|
|
4160
|
+
* Defaults to 'Enter text...' if not provided.
|
|
4161
|
+
*/
|
|
4162
|
+
addOptionPlaceholder?: string;
|
|
4163
|
+
/**
|
|
4164
|
+
* Optional "Option" object representing the option to create a new item within the dropdown.
|
|
4165
|
+
* This option is typically displayed at the top of the dropdown list.
|
|
4166
|
+
* Defaults to "{ label: 'Add option...', value: 'Add option...' }" if not provided.
|
|
4167
|
+
*/
|
|
4168
|
+
creationOption?: CreationOption;
|
|
4169
|
+
/**
|
|
4170
|
+
* Optional CSS width property value for the dropdown container.
|
|
4171
|
+
* Specify the width of the dropdown. Defaults to '100%' if not provided.
|
|
4172
|
+
*/
|
|
4173
|
+
width?: string;
|
|
4174
|
+
/**
|
|
4175
|
+
* An optional string that determines the overall styling of the select field.
|
|
4176
|
+
* Accepted values are 'outline', 'filled', 'flushed', or 'unstyled'.
|
|
4177
|
+
* The default value is 'outline'.
|
|
4178
|
+
*
|
|
4179
|
+
*/
|
|
4180
|
+
variant?: Variant;
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
/**
|
|
4184
|
+
* A dropdown component that allows users to select a value from given options
|
|
4185
|
+
* or create a new one if it doesn't exist.
|
|
4186
|
+
* @see {@link https://northlight.dev/reference/creatable-select-dropdown}
|
|
4187
|
+
*
|
|
4188
|
+
* @example (Example)
|
|
4189
|
+
* ##Select the best artist
|
|
4190
|
+
* (?
|
|
4191
|
+
* () => {
|
|
4192
|
+
* const [artist, setArtist] = useState(null);
|
|
4193
|
+
* const options = [
|
|
4194
|
+
* { label: 'Scooter', value: 'scooter' },
|
|
4195
|
+
* { label: 'Snoop Doggy Dogg', value: 'snoop-dogg' },
|
|
4196
|
+
* ];
|
|
4197
|
+
*
|
|
4198
|
+
* const handleOptionChange = (newOption) => {
|
|
4199
|
+
* setArtist(newOption);
|
|
4200
|
+
* // Perform additional actions with the selected or created option
|
|
4201
|
+
* };
|
|
4202
|
+
*
|
|
4203
|
+
* return (
|
|
4204
|
+
* <Box align="left">
|
|
4205
|
+
* <CreatableSelectDropdown
|
|
4206
|
+
* standardOptions={options}
|
|
4207
|
+
* onOptionChange={handleOptionChange}
|
|
4208
|
+
* width="300px"
|
|
4209
|
+
* />
|
|
4210
|
+
* { artist && artist.value !== 'Add option...' && (
|
|
4211
|
+
* <H3 py={8}>The best artist is: { artist.label }</H3>
|
|
4212
|
+
* ) }
|
|
4213
|
+
* </Box>
|
|
4214
|
+
* );
|
|
4215
|
+
* }
|
|
4216
|
+
* ?)
|
|
4217
|
+
*/
|
|
4218
|
+
declare const CreatableSelectDropdown: ({ standardOptions, initialPlaceholder, addOptionPlaceholder, creationOption, onOptionChange, width, variant, }: CreatableSelectDropdownProps) => JSX.Element;
|
|
4219
|
+
|
|
4113
4220
|
declare const useDebounce: <T>(value: T, delay: number) => T;
|
|
4114
4221
|
|
|
4115
4222
|
declare const useLoadingMessage: (prefix?: string, delay?: number) => string;
|
|
@@ -4174,4 +4281,4 @@ declare const useResizeWidth: ({ stationaryEdge, minWidthPx, maxWidthPx, default
|
|
|
4174
4281
|
declare const theme: Record<string, any>;
|
|
4175
4282
|
declare const tottTheme: Record<string, any>;
|
|
4176
4283
|
|
|
4177
|
-
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, H1, H2, H3, H4, H5, H6, HeadingProps, HeadingType, Icon, IconButton, IconButtonProps, IconProps, InputFieldProps, IntentButton, Label, LabelProps, LabelSizes, LabelType, Lead, ListenersType, LoadingBar, MaskedTextInput, MaskedTextInputProps, MediatoolThemeProvider, MediatoolThemeProviderProps, Menu, MenuProps, MenuVariants, Message, Modal, ModalBase, ModalBody, ModalBooleans, ModalProps, ModalSizes, MultiFileList, MultiFileListProps, MultiFilePicker, MultiFilePickerField, MultiFilePickerFieldProps, MultiFilePickerProps, MultiFileUploader, MultiFileUploaderProps, MultiItemType, MultiSort, MultiSortProps, NotificationIconButton, NotificationIconButtonProps, NumVal, NumValType, NumberInput, NumberInputField, NumberInputFieldProps, NumberInputProps, NumberInputSizeProps, NumberInputStepperProps, OffsetType, Option, OrganizationLogo, OrganizationLogoProps, OverflowGroup, OverflowGroupProps, OverflowIndicatorProps, P, PProps, PaneDivider, PaneItem, PinInput, PinInputProps, PinSize, PinSizeTuple, PinVariant, Popover, PresetOptions, ProgressBar, ProgressBarProps, Radio, RadioFieldGroupProps, RadioFieldProps, RadioGroup, RadioGroupField, RadioGroupProps, RadioProps, ResizeHandle, 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, Tooltip, TransitionDirection, UseFormReturn, UseSelectCallbacksProps, UseToastOptions, addAlpha, advancedParseFloat, clamp, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getMatchingValue, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useDebounce, useDidUpdateEffect, useLoadingMessage, useOutsideRectClick, useOverflowGroup, useResizeWidth, useScreenSize, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|
|
4284
|
+
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, CreatableSelectDropdown, 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, H1, H2, H3, H4, H5, H6, HeadingProps, HeadingType, Icon, IconButton, IconButtonProps, IconProps, InputFieldProps, IntentButton, Label, LabelProps, LabelSizes, LabelType, Lead, ListenersType, LoadingBar, MaskedTextInput, MaskedTextInputProps, MediatoolThemeProvider, MediatoolThemeProviderProps, Menu, MenuProps, MenuVariants, Message, Modal, ModalBase, ModalBody, ModalBooleans, ModalProps, ModalSizes, MultiFileList, MultiFileListProps, MultiFilePicker, MultiFilePickerField, MultiFilePickerFieldProps, MultiFilePickerProps, MultiFileUploader, MultiFileUploaderProps, MultiItemType, MultiSort, MultiSortProps, NotificationIconButton, NotificationIconButtonProps, NumVal, NumValType, NumberInput, NumberInputField, NumberInputFieldProps, NumberInputProps, NumberInputSizeProps, NumberInputStepperProps, OffsetType, Option, OrganizationLogo, OrganizationLogoProps, OverflowGroup, OverflowGroupProps, OverflowIndicatorProps, P, PProps, PaneDivider, PaneItem, PinInput, PinInputProps, PinSize, PinSizeTuple, PinVariant, Popover, PresetOptions, ProgressBar, ProgressBarProps, Radio, RadioFieldGroupProps, RadioFieldProps, RadioGroup, RadioGroupField, RadioGroupProps, RadioProps, ResizeHandle, 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, Tooltip, TransitionDirection, UseFormReturn, UseSelectCallbacksProps, UseToastOptions, addAlpha, advancedParseFloat, clamp, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getMatchingValue, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useDebounce, useDidUpdateEffect, useLoadingMessage, useOutsideRectClick, useOverflowGroup, useResizeWidth, useScreenSize, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|