@northlight/ui 2.26.1 → 2.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/northlight.d.ts +7 -72
- package/dist/es/northlight.js +381 -304
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +380 -303
- 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 +2 -2
package/dist/es/northlight.d.ts
CHANGED
|
@@ -121,6 +121,7 @@ type Size$1 = 'sm' | 'md' | 'lg';
|
|
|
121
121
|
interface Option<T extends string = string> {
|
|
122
122
|
label: string;
|
|
123
123
|
value: T;
|
|
124
|
+
isCreation?: boolean;
|
|
124
125
|
}
|
|
125
126
|
interface SelectProps<T, K extends boolean> extends Omit<Props<T, K, GroupBase<T>>, 'onChange' | 'value' | 'isMulti'> {
|
|
126
127
|
/** Whatever is currently selected by the select will be controlled by value prop, if value is
|
|
@@ -4022,13 +4023,16 @@ declare const PaneItem: ({ children, ...rest }: GridItemProps) => JSX.Element;
|
|
|
4022
4023
|
declare const PaneDivider: _chakra_ui_system_dist_system_types.ComponentWithAs<_chakra_ui_system_dist_system_types.As, BoxProps>;
|
|
4023
4024
|
|
|
4024
4025
|
type EditableSizes = 'sm' | 'md' | 'lg';
|
|
4026
|
+
type EditableVariant = 'brand' | 'default';
|
|
4025
4027
|
interface EditableProps extends EditableProps$1 {
|
|
4026
4028
|
value?: string;
|
|
4027
4029
|
size?: EditableSizes;
|
|
4028
4030
|
leftItem?: ReactElement;
|
|
4031
|
+
variant?: EditableVariant;
|
|
4029
4032
|
}
|
|
4030
4033
|
interface EditableControlsProps {
|
|
4031
4034
|
size: EditableSizes;
|
|
4035
|
+
variant: EditableVariant;
|
|
4032
4036
|
}
|
|
4033
4037
|
|
|
4034
4038
|
/**
|
|
@@ -4061,7 +4065,7 @@ interface EditableControlsProps {
|
|
|
4061
4065
|
</p>
|
|
4062
4066
|
*
|
|
4063
4067
|
*/
|
|
4064
|
-
declare const EditableText: ({ size, value: inputValue, onSubmit, leftItem, ...rest }: EditableProps) => JSX.Element;
|
|
4068
|
+
declare const EditableText: ({ size, value: inputValue, onSubmit, leftItem, variant, ...rest }: EditableProps) => JSX.Element;
|
|
4065
4069
|
|
|
4066
4070
|
interface StepStackProps extends StackProps {
|
|
4067
4071
|
children: ReactNode | ReactNode[];
|
|
@@ -4194,76 +4198,7 @@ interface CreatableSelectDropdownProps<T extends string = string> {
|
|
|
4194
4198
|
menuPlacement?: 'top' | 'bottom' | 'auto';
|
|
4195
4199
|
}
|
|
4196
4200
|
|
|
4197
|
-
|
|
4198
|
-
* A dropdown component that allows users to select a value from given options
|
|
4199
|
-
* or create a new one if it doesn't exist.
|
|
4200
|
-
* @see {@link https://northlight.dev/reference/creatable-select-dropdown}
|
|
4201
|
-
*
|
|
4202
|
-
* @example (Example)
|
|
4203
|
-
* (?
|
|
4204
|
-
* () => {
|
|
4205
|
-
* const [artist, setArtist] = useState(null);
|
|
4206
|
-
* const [element, setElement] = useState({ label: 'Technique', value: 'technique' })
|
|
4207
|
-
* const someOptions = [
|
|
4208
|
-
* { label: 'Scooter', value: 'scooter' },
|
|
4209
|
-
* { label: 'Snoop Doggy Dogg', value: 'snoop-dogg' },
|
|
4210
|
-
* ];
|
|
4211
|
-
*
|
|
4212
|
-
* const someOtherOptions = [
|
|
4213
|
-
* { label: 'Vision', value: 'vision' },
|
|
4214
|
-
* { label: 'Technique', value: 'technique' },
|
|
4215
|
-
* { label: 'Expression', value: 'expression' }
|
|
4216
|
-
* ];
|
|
4217
|
-
*
|
|
4218
|
-
* return (
|
|
4219
|
-
* <VStack gap={10} alignItems={"flex-start"}>
|
|
4220
|
-
* <Box align="left">
|
|
4221
|
-
* <H1>Basic example</H1>
|
|
4222
|
-
* <H3>Select the best artist</H3>
|
|
4223
|
-
* <CreatableSelectDropdown
|
|
4224
|
-
* standardOptions={someOptions}
|
|
4225
|
-
* onOptionChange={setArtist}
|
|
4226
|
-
* width="300px"
|
|
4227
|
-
* value={artist ? artist.value : undefined}
|
|
4228
|
-
* />
|
|
4229
|
-
* {artist && artist.value !== 'Add option...' && (
|
|
4230
|
-
* <H3 py={8}>The best artist is: {artist.label}</H3>
|
|
4231
|
-
* )}
|
|
4232
|
-
* </Box>
|
|
4233
|
-
* <Box align="left">
|
|
4234
|
-
* <H1>Pre-selected option</H1>
|
|
4235
|
-
* <H3>What is the quintessential element of an exceptional artisan?</H3>
|
|
4236
|
-
* <CreatableSelectDropdown
|
|
4237
|
-
* standardOptions={someOtherOptions}
|
|
4238
|
-
* onOptionChange={setElement}
|
|
4239
|
-
* width="300px"
|
|
4240
|
-
* value={element ? element.value : undefined}
|
|
4241
|
-
* />
|
|
4242
|
-
* {element && element.value !== 'Add option...' && (
|
|
4243
|
-
* <H3 py={8}>
|
|
4244
|
-
* {element.value === 'vision' && (
|
|
4245
|
-
* 'The artist\'s vision shapes their creative world.'
|
|
4246
|
-
* )}
|
|
4247
|
-
* {element.value === 'technique' && (
|
|
4248
|
-
* 'Technique is the legacy\'s bedrock.'
|
|
4249
|
-
* )}
|
|
4250
|
-
* {element.value === 'expression' && (
|
|
4251
|
-
* 'Expression communicates the artist\'s inner voice.'
|
|
4252
|
-
* )}
|
|
4253
|
-
* {element.value !== 'vision' &&
|
|
4254
|
-
* element.value !== 'technique' &&
|
|
4255
|
-
* element.value !== 'expression' && (
|
|
4256
|
-
* 'Absent the selection of legitimate alternatives.'
|
|
4257
|
-
* )}
|
|
4258
|
-
* </H3>
|
|
4259
|
-
* )}
|
|
4260
|
-
* </Box>
|
|
4261
|
-
* </VStack>
|
|
4262
|
-
* );
|
|
4263
|
-
* }
|
|
4264
|
-
* ?)
|
|
4265
|
-
*/
|
|
4266
|
-
declare const CreatableSelectDropdown: <T extends string = string>({ standardOptions, initialPlaceholder, addOptionPlaceholder, creationOption, onOptionChange, width, variant, defaultValue, value, menuPlacement, }: CreatableSelectDropdownProps<T>) => JSX.Element;
|
|
4201
|
+
declare const CreatableSelectDropdown: <T extends string = string>({ standardOptions, initialPlaceholder, addOptionPlaceholder, creationOption, onOptionChange, variant, defaultValue, value, menuPlacement, ...restProps }: CreatableSelectDropdownProps<T>) => JSX.Element;
|
|
4267
4202
|
|
|
4268
4203
|
declare const useDebounce: <T>(value: T, delay: number) => T;
|
|
4269
4204
|
|
|
@@ -4329,4 +4264,4 @@ declare const useResizeWidth: ({ stationaryEdge, minWidthPx, maxWidthPx, default
|
|
|
4329
4264
|
declare const theme: Record<string, any>;
|
|
4330
4265
|
declare const tottTheme: Record<string, any>;
|
|
4331
4266
|
|
|
4332
|
-
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 };
|
|
4267
|
+
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, EditableVariant, 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 };
|