@northlight/ui 2.2.0 → 2.4.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 +54 -8
- package/dist/es/northlight.mjs +35 -8
- package/dist/es/northlight.mjs.map +1 -1
- package/dist/ts/types.d.ts +54 -8
- package/dist/umd/northlight.js +35 -7
- 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 +4 -2
package/dist/es/northlight.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
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, StackDirection, 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, 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, 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, Stat, StatArrow, StatGroup, StatHelpText, StatLabel, StatNumber, TabIndicator as StepIndicator, TabPanels as StepPanels, Tab, TabIndicator, TabList, TabPanels, Table, TableCaption, TableContainer, 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
3
|
import * as React$1 from 'react';
|
|
4
|
-
import React__default, { ChangeEvent, ComponentType, InputHTMLAttributes, ReactNode, ReactElement } from 'react';
|
|
5
|
-
import { RegisterOptions, FieldValues, UseFormReturn as UseFormReturn$1, SetValueConfig, ControllerRenderProps, UseFormProps, FieldError, Merge, FieldErrorsImpl } from 'react-hook-form';
|
|
4
|
+
import React__default, { ChangeEvent, ComponentType, InputHTMLAttributes, ReactNode, ReactElement, RefObject } from 'react';
|
|
5
|
+
import { RegisterOptions, FieldValues, UseFormReturn as UseFormReturn$1, SetValueConfig, FieldPath, Control, ControllerRenderProps, UseFormProps, FieldError, Merge, FieldErrorsImpl } from 'react-hook-form';
|
|
6
6
|
export { useController, useFieldArray, useForm, useFormContext, useFormState, useWatch } from 'react-hook-form';
|
|
7
7
|
import { CheckboxGroupState } from '@react-stately/checkbox';
|
|
8
8
|
import { RadioGroupState } from '@react-stately/radio';
|
|
@@ -2143,8 +2143,8 @@ type UseFormReturn<T extends FieldValues> = UseFormReturn$1<T>;
|
|
|
2143
2143
|
type Maybe<T> = T | undefined;
|
|
2144
2144
|
type CustomSubmitHandler<TFieldValues extends FieldValues> = (data: TFieldValues, event: UseFormReturn<TFieldValues>) => any | Promise<any>;
|
|
2145
2145
|
type SetValueOptionsType = Maybe<SetValueConfig>;
|
|
2146
|
-
interface FieldProps {
|
|
2147
|
-
name:
|
|
2146
|
+
interface FieldProps<FormValues extends FieldValues = FieldValues, FieldName extends FieldPath<FormValues> = FieldPath<FormValues>> {
|
|
2147
|
+
name: FieldName;
|
|
2148
2148
|
/** Label displayed as text beside or under/over
|
|
2149
2149
|
* (depending on direction prop) over children. Recommended for accesibility */
|
|
2150
2150
|
label?: string;
|
|
@@ -2161,7 +2161,12 @@ interface FieldProps {
|
|
|
2161
2161
|
* for more information view https://react-hook-form.com/api/useform/register/ docs. (Whatever you put into the validate object will be put as the second options arguments on the react hook form register method)
|
|
2162
2162
|
* */
|
|
2163
2163
|
validate?: RegisterOptions;
|
|
2164
|
-
|
|
2164
|
+
/**
|
|
2165
|
+
* The value is taken from the formContext by default,
|
|
2166
|
+
* but may be manually specified to ensure field type inference.
|
|
2167
|
+
* */
|
|
2168
|
+
control?: Control<FormValues>;
|
|
2169
|
+
children: (field: ControllerRenderProps<FormValues, FieldName>, methods: UseFormReturn<FormValues>) => JSX.Element;
|
|
2165
2170
|
}
|
|
2166
2171
|
interface FormProps<FormValues extends FieldValues> {
|
|
2167
2172
|
/** This should contain an object with the name of the fields and their default values. */
|
|
@@ -2468,7 +2473,6 @@ type SelectFieldProps<T> = Omit<SelectProps<T>, 'onChange'> & InputFieldProps &
|
|
|
2468
2473
|
* <Select
|
|
2469
2474
|
* options={[{ label: 'Option 1', value: '1' }, { label: 'Option 2', value: '2' }]}
|
|
2470
2475
|
* onChange={(value, action) => console.log('Selected:', value)}
|
|
2471
|
-
* isClearable={ true }
|
|
2472
2476
|
* />
|
|
2473
2477
|
* ?)
|
|
2474
2478
|
*
|
|
@@ -3227,8 +3231,42 @@ declare const Form: <FormValues extends FieldValues>(props: FormProps<FormValues
|
|
|
3227
3231
|
* }
|
|
3228
3232
|
* ?)
|
|
3229
3233
|
*
|
|
3234
|
+
* @example (Example)
|
|
3235
|
+
* ## Type-safety
|
|
3236
|
+
* There are multiple ways to provide types for
|
|
3237
|
+
* the field callback values. To ensure that each
|
|
3238
|
+
* component within the field receives the correct
|
|
3239
|
+
* value, it's essential to make the field aware
|
|
3240
|
+
* of the form state values. When the Field component
|
|
3241
|
+
* does not receive any types, the "value" callback
|
|
3242
|
+
* argument will have the type of "any".
|
|
3243
|
+
* <br /><br />
|
|
3244
|
+
* ### Passing down the control prop (Recommended)
|
|
3245
|
+
* (?
|
|
3246
|
+
* <Form initialValues={{username: 'Alex'}}>
|
|
3247
|
+
* {
|
|
3248
|
+
* ({ control }) => {
|
|
3249
|
+
* <Box p="2">
|
|
3250
|
+
* <Field name="username" label="Input name" control={ control }>
|
|
3251
|
+
* {({value, onChange}) => ( // "value" has type of "string"
|
|
3252
|
+
* <Input value={value} onChange={onChange} />
|
|
3253
|
+
* )}
|
|
3254
|
+
* </Field>
|
|
3255
|
+
* </Box>
|
|
3256
|
+
* }
|
|
3257
|
+
* }
|
|
3258
|
+
* </Form>
|
|
3259
|
+
* ?)
|
|
3260
|
+
* <br /><br />
|
|
3261
|
+
* ### Specifying generic arguments
|
|
3262
|
+
* You can also specify generic arguments on the Field
|
|
3263
|
+
* component to ensure that "value" has a valid type.
|
|
3264
|
+
* The passed generic type combined with the valid
|
|
3265
|
+
* "name" property ensures that "value" has the expected
|
|
3266
|
+
* type received from the generic type:
|
|
3267
|
+
* `<Field<MyFormBody> name="username">...</Field>`
|
|
3230
3268
|
*/
|
|
3231
|
-
declare function Field({ name, label, children, direction, isRequired, noLabelConnection, validate, }: FieldProps): JSX.Element;
|
|
3269
|
+
declare function Field<FormValues extends FieldValues = FieldValues, FieldName extends FieldPath<FormValues> = FieldPath<FormValues>>({ name, label, children, direction, isRequired, noLabelConnection, validate, control: passedControl, }: FieldProps<FormValues, FieldName>): JSX.Element;
|
|
3232
3270
|
|
|
3233
3271
|
declare const useSetValueRefreshed: () => (name: any, value: any, options: SetValueOptionsType) => void;
|
|
3234
3272
|
|
|
@@ -3469,6 +3507,14 @@ declare const useDebounce: <T>(value: T, delay: number) => T;
|
|
|
3469
3507
|
|
|
3470
3508
|
declare const useLoadingMessage: (prefix?: string, delay?: number) => string;
|
|
3471
3509
|
|
|
3510
|
+
interface Message {
|
|
3511
|
+
content: string;
|
|
3512
|
+
role: string;
|
|
3513
|
+
type?: string;
|
|
3514
|
+
data?: string;
|
|
3515
|
+
}
|
|
3516
|
+
declare const useScrollToBottom: (scrollView: RefObject<HTMLDivElement>, messages: Message[]) => void;
|
|
3517
|
+
|
|
3472
3518
|
declare const useArrowFocus: (columns: number) => {
|
|
3473
3519
|
defaultArrows: (e: any) => void;
|
|
3474
3520
|
focusPrevious: ({ repeat, wrap, }?: {
|
|
@@ -3501,4 +3547,4 @@ declare const useSelectCallbacks: <T extends BasicOption>({ onChange, onAdd, onR
|
|
|
3501
3547
|
declare const theme: Record<string, any>;
|
|
3502
3548
|
declare const tottTheme: Record<string, any>;
|
|
3503
3549
|
|
|
3504
|
-
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, Modal, 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, 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, useLoadingMessage, useOverflowGroup, useSelectCallbacks, useSetValueRefreshed, useToast };
|
|
3550
|
+
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, 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, 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, useLoadingMessage, useOverflowGroup, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|
package/dist/es/northlight.mjs
CHANGED
|
@@ -1540,6 +1540,32 @@ const useLoadingMessage = (prefix = "", delay = 300) => {
|
|
|
1540
1540
|
return `${prefix}${dots}`;
|
|
1541
1541
|
};
|
|
1542
1542
|
|
|
1543
|
+
const smoothScrollToBottom = (div) => {
|
|
1544
|
+
const totalSteps = 50;
|
|
1545
|
+
let currentStep = 0;
|
|
1546
|
+
const targetScrollTop = div.scrollHeight - div.clientHeight;
|
|
1547
|
+
const originalScrollTop = div.scrollTop;
|
|
1548
|
+
const scrollInterval = setInterval(() => {
|
|
1549
|
+
if (currentStep >= totalSteps) {
|
|
1550
|
+
clearInterval(scrollInterval);
|
|
1551
|
+
} else {
|
|
1552
|
+
currentStep += 1;
|
|
1553
|
+
const scrollProgress = currentStep / totalSteps;
|
|
1554
|
+
const easing = 1 - (1 - scrollProgress) * (1 - scrollProgress);
|
|
1555
|
+
div.scrollTop = originalScrollTop + (targetScrollTop - originalScrollTop) * easing;
|
|
1556
|
+
}
|
|
1557
|
+
}, 20);
|
|
1558
|
+
};
|
|
1559
|
+
|
|
1560
|
+
const useScrollToBottom = (scrollView, messages) => {
|
|
1561
|
+
useEffect(() => {
|
|
1562
|
+
const div = scrollView.current;
|
|
1563
|
+
if (div) {
|
|
1564
|
+
smoothScrollToBottom(div);
|
|
1565
|
+
}
|
|
1566
|
+
}, [messages]);
|
|
1567
|
+
};
|
|
1568
|
+
|
|
1543
1569
|
const useArrowFocus = (columns) => {
|
|
1544
1570
|
const {
|
|
1545
1571
|
focusNext: next,
|
|
@@ -1642,13 +1668,12 @@ function Field({
|
|
|
1642
1668
|
direction = "column",
|
|
1643
1669
|
isRequired = false,
|
|
1644
1670
|
noLabelConnection = false,
|
|
1645
|
-
validate
|
|
1671
|
+
validate,
|
|
1672
|
+
control: passedControl
|
|
1646
1673
|
}) {
|
|
1647
1674
|
const methods = useFormContext();
|
|
1648
|
-
const {
|
|
1649
|
-
|
|
1650
|
-
formState: { errors }
|
|
1651
|
-
} = methods;
|
|
1675
|
+
const { formState: { errors } } = methods;
|
|
1676
|
+
const control = passedControl != null ? passedControl : methods.control;
|
|
1652
1677
|
const fieldError = getFieldError(name, errors);
|
|
1653
1678
|
return /* @__PURE__ */ React.createElement(FormControl, { isInvalid: !!fieldError, isRequired }, /* @__PURE__ */ React.createElement(
|
|
1654
1679
|
Stack,
|
|
@@ -10897,8 +10922,10 @@ function SelectField(_a) {
|
|
|
10897
10922
|
variant: "danger",
|
|
10898
10923
|
size: "sm",
|
|
10899
10924
|
fontSize: "xs",
|
|
10900
|
-
hidden: value ===
|
|
10901
|
-
onClick:
|
|
10925
|
+
hidden: value === void 0 || !isClearable,
|
|
10926
|
+
onClick: () => {
|
|
10927
|
+
onChange(void 0);
|
|
10928
|
+
},
|
|
10902
10929
|
icon: /* @__PURE__ */ React.createElement(Icon$1, { as: XCloseSolid })
|
|
10903
10930
|
}
|
|
10904
10931
|
))
|
|
@@ -12034,5 +12061,5 @@ const StepStack = (_a) => {
|
|
|
12034
12061
|
));
|
|
12035
12062
|
};
|
|
12036
12063
|
|
|
12037
|
-
export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert$1 as Alert, AspectRatio, AsyncError, Avatar$1 as Avatar, AvatarGroup, Badge, Blinker$1 as Blinker, Blockquote$1 as Blockquote, Button$1 as Button, Capitalized$1 as Capitalized, Carousel$1 as Carousel, Checkbox$1 as Checkbox, CheckboxField, Clickable, ClipboardInput, Collapse, ColorPicker$1 as ColorPicker, ColorPickerField, CustomTheme, DatePicker$1 as DatePicker, DatePickerField, DateRangePicker, DateRangePickerField, DragAndDrop$1 as DragAndDrop, DragHandle, DragItem, Draggable, DropZone, Droppable, EditableText$1 as EditableText, Fade, FastGrid, FastList, Field, FilePicker$1 as FilePicker, FilePickerField, FlipButton$1 as FlipButton, FlipButtonGroup, FlipButtonGroupField, Form, FormLabel, FormattedNumberInput, H1$1 as H1, H2$1 as H2, H3$1 as H3, H4$1 as H4, H5$1 as H5, H6$1 as H6, Icon$1 as Icon, IconButton, Label$1 as Label, Lead$1 as Lead, MaskedTextInput, MediatoolThemeProvider, Modal$1 as Modal, MultiFileList, MultiFilePicker, MultiFilePickerField, MultiFileUploader, MultiSort, NotificationIconButton, NumberInput, NumberInputField, OrganizationLogo, OverflowGroup, P$1 as P, PaneDivider, PaneItem, PinInput, ProgressBar, Radio$1 as Radio, RadioGroup, RadioGroupField, ScaleFade, SearchBar, SearchBarField, Select, SelectField, Slide, SlideFade, Small$1 as Small, Sortable, SortableContainer, SortableItem, SortableList, Spinner$1 as Spinner, SplitPane, StatusBlock, StatusPin, Step, StepList, StepPanel, StepStack, Steps, Switch, SwitchField, TabPanel, Tabs, Tag$1 as Tag, TagGroup, TextField, Textarea, TextareaField, Tiny$1 as Tiny, Toast, Toolbox$1 as Toolbox, ToolboxContent, ToolboxFooter, ToolboxHeader, addAlpha, advancedParseFloat, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useDebounce, useLoadingMessage, useOverflowGroup, useSelectCallbacks, useSetValueRefreshed, useToast };
|
|
12064
|
+
export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert$1 as Alert, AspectRatio, AsyncError, Avatar$1 as Avatar, AvatarGroup, Badge, Blinker$1 as Blinker, Blockquote$1 as Blockquote, Button$1 as Button, Capitalized$1 as Capitalized, Carousel$1 as Carousel, Checkbox$1 as Checkbox, CheckboxField, Clickable, ClipboardInput, Collapse, ColorPicker$1 as ColorPicker, ColorPickerField, CustomTheme, DatePicker$1 as DatePicker, DatePickerField, DateRangePicker, DateRangePickerField, DragAndDrop$1 as DragAndDrop, DragHandle, DragItem, Draggable, DropZone, Droppable, EditableText$1 as EditableText, Fade, FastGrid, FastList, Field, FilePicker$1 as FilePicker, FilePickerField, FlipButton$1 as FlipButton, FlipButtonGroup, FlipButtonGroupField, Form, FormLabel, FormattedNumberInput, H1$1 as H1, H2$1 as H2, H3$1 as H3, H4$1 as H4, H5$1 as H5, H6$1 as H6, Icon$1 as Icon, IconButton, Label$1 as Label, Lead$1 as Lead, MaskedTextInput, MediatoolThemeProvider, Modal$1 as Modal, MultiFileList, MultiFilePicker, MultiFilePickerField, MultiFileUploader, MultiSort, NotificationIconButton, NumberInput, NumberInputField, OrganizationLogo, OverflowGroup, P$1 as P, PaneDivider, PaneItem, PinInput, ProgressBar, Radio$1 as Radio, RadioGroup, RadioGroupField, ScaleFade, SearchBar, SearchBarField, Select, SelectField, Slide, SlideFade, Small$1 as Small, Sortable, SortableContainer, SortableItem, SortableList, Spinner$1 as Spinner, SplitPane, StatusBlock, StatusPin, Step, StepList, StepPanel, StepStack, Steps, Switch, SwitchField, TabPanel, Tabs, Tag$1 as Tag, TagGroup, TextField, Textarea, TextareaField, Tiny$1 as Tiny, Toast, Toolbox$1 as Toolbox, ToolboxContent, ToolboxFooter, ToolboxHeader, addAlpha, advancedParseFloat, createDebounceFunctionInstance, getChildrenWithProps, getContrastColor, getFieldError, getInitials, getShades, highlight, luminosity, ring, statusIconMap, theme, tottTheme, trimFormValues, useArrowFocus, useCurrentTheme, useDebounce, useLoadingMessage, useOverflowGroup, useScrollToBottom, useSelectCallbacks, useSetValueRefreshed, useToast };
|
|
12038
12065
|
//# sourceMappingURL=northlight.mjs.map
|