@northlight/ui 2.20.1 → 2.21.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 +77 -24
- package/dist/es/northlight.js +38 -9
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +37 -8
- 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
|
@@ -420,23 +420,24 @@ declare const AvatarGroup: ({ children, max, spacing, ...rest }: AvatarGroupProp
|
|
|
420
420
|
*
|
|
421
421
|
* @example
|
|
422
422
|
* (?
|
|
423
|
-
*
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
423
|
+
* +
|
|
424
|
+
* const colors = ["gray", "mediatoolBlue", "blue", "red", "green",
|
|
425
|
+
* "orange", "yellow", "teal", "purple", "pink"]
|
|
426
|
+
* const variants = ["solid", "outline", "subtle"]
|
|
427
|
+
* const Example = () => {
|
|
428
|
+
* return <Stack>
|
|
429
|
+
* { colors.map((color) => (
|
|
430
|
+
* <HStack spacing={ 4 }>
|
|
431
|
+
* {
|
|
432
|
+
* variants.map((variant) => (
|
|
433
|
+
* <Badge colorScheme={color} variant={variant}>{variant} Badge</Badge>
|
|
434
|
+
* ))
|
|
435
|
+
* }
|
|
436
|
+
* </HStack>
|
|
437
|
+
* ))}
|
|
438
|
+
* </Stack>
|
|
439
|
+
* }
|
|
440
|
+
* render(<Example/>)
|
|
440
441
|
* ?)
|
|
441
442
|
*/
|
|
442
443
|
declare const Badge: (props: BadgeProps & React__default.RefAttributes<HTMLDivElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
@@ -3022,22 +3023,74 @@ interface TagGroupProps extends StackProps {
|
|
|
3022
3023
|
}
|
|
3023
3024
|
|
|
3024
3025
|
/**
|
|
3026
|
+
* Tag component is used for items that need to be labeled,
|
|
3027
|
+
* categorized, or organized using keywords that describe them.
|
|
3025
3028
|
* @see TagGroup
|
|
3026
3029
|
* @see {@link https://northlight.dev/reference/tag}
|
|
3027
3030
|
*
|
|
3028
3031
|
* @example
|
|
3029
|
-
* (?
|
|
3032
|
+
* (?
|
|
3033
|
+
* <Tag>Hello</Tag>
|
|
3034
|
+
* ?)
|
|
3030
3035
|
*
|
|
3031
3036
|
* @example
|
|
3032
3037
|
* (?
|
|
3033
|
-
*
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3038
|
+
* +
|
|
3039
|
+
* const colors = ["mediatoolBlue", "blue", "gray", "red", "green",
|
|
3040
|
+
* "orange", "yellow", "teal", "purple", "pink"]
|
|
3041
|
+
* const variants = ["solid", "subtle"]
|
|
3042
|
+
* const Example = () => {
|
|
3043
|
+
* return <Stack>
|
|
3044
|
+
* { colors.map((color) => (
|
|
3045
|
+
* <HStack spacing={ 4 }>
|
|
3046
|
+
* {
|
|
3047
|
+
* variants.map((variant) => (
|
|
3048
|
+
* <HStack spacing={ 4 }>
|
|
3049
|
+
* <Tag size="sm" variant={variant} colorScheme={color}>
|
|
3050
|
+
* <TagLeftIcon size="xs">
|
|
3051
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3052
|
+
* </TagLeftIcon>
|
|
3053
|
+
* <TagLabel>
|
|
3054
|
+
* Hello
|
|
3055
|
+
* </TagLabel>
|
|
3056
|
+
* <TagRightIcon size="xs">
|
|
3057
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3058
|
+
* </TagRightIcon>
|
|
3059
|
+
* </Tag>
|
|
3060
|
+
* <Tag size="md" variant={variant} colorScheme={color}>
|
|
3061
|
+
* <TagLeftIcon size="md">
|
|
3062
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3063
|
+
* </TagLeftIcon>
|
|
3064
|
+
* <TagLabel>
|
|
3065
|
+
* Hello
|
|
3066
|
+
* </TagLabel>
|
|
3067
|
+
* <TagRightIcon size="md">
|
|
3068
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3069
|
+
* </TagRightIcon>
|
|
3070
|
+
* </Tag>
|
|
3071
|
+
* <Tag size="lg" variant={variant} colorScheme={color}>
|
|
3072
|
+
* <TagLeftIcon size="lg">
|
|
3073
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3074
|
+
* </TagLeftIcon>
|
|
3075
|
+
* <TagLabel>
|
|
3076
|
+
* Hello
|
|
3077
|
+
* </TagLabel>
|
|
3078
|
+
* <TagRightIcon size="lg">
|
|
3079
|
+
* <Icon as={ MediatoolLogoDuo } />
|
|
3080
|
+
* </TagRightIcon>
|
|
3081
|
+
* </Tag>
|
|
3082
|
+
* </HStack>
|
|
3083
|
+
* ))
|
|
3084
|
+
* }
|
|
3085
|
+
* </HStack>
|
|
3086
|
+
* ))
|
|
3087
|
+
* }
|
|
3088
|
+
* </Stack>
|
|
3089
|
+
* }
|
|
3090
|
+
* render(<Example/>)
|
|
3039
3091
|
* ?)
|
|
3040
3092
|
*
|
|
3093
|
+
*
|
|
3041
3094
|
*/
|
|
3042
3095
|
declare const Tag: (props: TagProps & React__default.RefAttributes<HTMLSpanElement>) => React__default.ReactElement<any, string | React__default.JSXElementConstructor<any>> | null;
|
|
3043
3096
|
|
package/dist/es/northlight.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Accordion as Accordion$1, AccordionButton as AccordionButton$1, AccordionPanel as AccordionPanel$1, AccordionItem as AccordionItem$1, useInterval, useMediaQuery, useToken as useToken$1, Box, useMultiStyleConfig, chakra, Alert as Alert$2, AspectRatio as AspectRatio$1, forwardRef, useStyleConfig, Icon as Icon$2, Heading, Text, FormLabel as FormLabel$1, VisuallyHidden, HStack, Badge as Badge$
|
|
1
|
+
import { Accordion as Accordion$1, AccordionButton as AccordionButton$1, AccordionPanel as AccordionPanel$1, AccordionItem as AccordionItem$1, useInterval, useMediaQuery, useToken as useToken$1, Box, useMultiStyleConfig, chakra, Alert as Alert$2, AspectRatio as AspectRatio$1, forwardRef, useStyleConfig, Icon as Icon$2, Heading, Text, FormLabel as FormLabel$1, VisuallyHidden, HStack, Badge as Badge$2, Spinner as Spinner$2, Button as Button$2, Checkbox as Checkbox$2, FormControl, Stack, FormErrorMessage, Flex, IconButton as IconButton$1, Popover as Popover$1, useDisclosure, useBoolean, PopoverTrigger, PopoverContent, PopoverHeader, PopoverBody, SimpleGrid, SlideFade as SlideFade$1, keyframes, extendTheme, Table as Table$2, Thead, Tbody, Tr, Select as Select$2, PopoverAnchor, InputGroup, InputRightElement, Link as Link$1, Tooltip as Tooltip$2, Circle, Center, Fade as Fade$1, ScaleFade as ScaleFade$1, Slide as Slide$1, Collapse as Collapse$1, Portal, CloseButton as CloseButton$1, Radio as Radio$2, RadioGroup as RadioGroup$1, Tag as Tag$2, TagLabel, TagRightIcon, useEditableControls, useEditableState, Editable, InputLeftElement, Input as Input$1, EditablePreview, EditableInput, Modal as Modal$2, ModalOverlay, ModalContent, ModalCloseButton, ModalBody as ModalBody$1, ModalHeader, Slider, SliderTrack, SliderFilledTrack, SliderThumb, ModalFooter, VStack, Progress, Image as Image$1, ChakraProvider, Menu as Menu$2, NumberInputStepper as NumberInputStepper$1, Divider, NumberIncrementStepper, NumberDecrementStepper, NumberInput as NumberInput$2, NumberInputField as NumberInputField$1, PinInput as PinInput$2, Switch as Switch$2, TabPanel as TabPanel$1, Tabs as Tabs$2, Textarea as Textarea$2, useToast as useToast$1, TagLeftIcon, AlertTitle, AlertDescription, Tab, TabList, useClipboard, Grid, GridItem } from '@chakra-ui/react';
|
|
2
2
|
export { AbsoluteCenter, AccordionIcon, AlertDescription, AlertDialog, AlertDialogBody, AlertDialogCloseButton, AlertDialogContent, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertIcon, AlertTitle, Box, 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, MenuButton, MenuCommand, MenuDivider, MenuGroup, MenuIcon, MenuItem, MenuItemOption, MenuList, MenuOptionGroup, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, NumberDecrementStepper, NumberIncrementStepper, OrderedList, PinInputField, 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, TableCaption, TableContainer, TagCloseButton, TagLabel, TagLeftIcon, TagRightIcon, Tbody, Td, Text, Tfoot, Th, Thead, Tr, UnorderedList, VStack, VisuallyHidden, VisuallyHiddenInput, Wrap, WrapItem, keyframes, 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 React, { useState, useEffect, useRef, isValidElement, cloneElement, Children, createContext, useContext, forwardRef as forwardRef$1, useImperativeHandle, memo, useMemo, useCallback } from 'react';
|
|
4
4
|
import { CreatableSelect, chakraComponents, AsyncSelect, Select as Select$3 } from 'chakra-react-select';
|
|
@@ -1790,7 +1790,7 @@ var __spreadValues$1Q = (a, b) => {
|
|
|
1790
1790
|
}
|
|
1791
1791
|
return a;
|
|
1792
1792
|
};
|
|
1793
|
-
const Badge = forwardRef$1((props, ref) => /* @__PURE__ */ React.createElement(Badge$
|
|
1793
|
+
const Badge$1 = forwardRef$1((props, ref) => /* @__PURE__ */ React.createElement(Badge$2, __spreadValues$1Q({ ref }, props)));
|
|
1794
1794
|
|
|
1795
1795
|
var __defProp$1P = Object.defineProperty;
|
|
1796
1796
|
var __getOwnPropSymbols$1P = Object.getOwnPropertySymbols;
|
|
@@ -3909,16 +3909,16 @@ const Tag$1 = {
|
|
|
3909
3909
|
}
|
|
3910
3910
|
},
|
|
3911
3911
|
variants: {
|
|
3912
|
-
solid: ({
|
|
3912
|
+
solid: ({ theme: { colors }, colorScheme }) => ({
|
|
3913
3913
|
container: {
|
|
3914
|
-
bgColor:
|
|
3915
|
-
color:
|
|
3914
|
+
bgColor: colors[colorScheme] && colors[colorScheme][500] ? colors[colorScheme][500] : colorScheme,
|
|
3915
|
+
color: colorScheme === "yellow" ? "mono.black" : "mono.white"
|
|
3916
3916
|
}
|
|
3917
3917
|
}),
|
|
3918
|
-
subtle: () => ({
|
|
3918
|
+
subtle: ({ theme: { colors }, colorScheme }) => ({
|
|
3919
3919
|
container: {
|
|
3920
|
-
bgColor:
|
|
3921
|
-
color: "
|
|
3920
|
+
bgColor: colors[colorScheme] && colors[colorScheme][100] ? colors[colorScheme][100] : colorScheme,
|
|
3921
|
+
color: "mono.black"
|
|
3922
3922
|
}
|
|
3923
3923
|
}),
|
|
3924
3924
|
ai: {
|
|
@@ -5664,10 +5664,39 @@ const Menu$1 = {
|
|
|
5664
5664
|
}
|
|
5665
5665
|
};
|
|
5666
5666
|
|
|
5667
|
+
const Badge = {
|
|
5668
|
+
baseStyle: ({ colorScheme, theme: { colors } }) => {
|
|
5669
|
+
const bgColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][100] : colors[colorScheme] && colors[colorScheme][100];
|
|
5670
|
+
const textColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][800] : colors[colorScheme] && colors[colorScheme][800];
|
|
5671
|
+
return {
|
|
5672
|
+
bgColor,
|
|
5673
|
+
color: textColor
|
|
5674
|
+
};
|
|
5675
|
+
},
|
|
5676
|
+
variants: {
|
|
5677
|
+
solid: ({ colorScheme, theme: { colors } }) => {
|
|
5678
|
+
const bgColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][500] : colors[colorScheme] && colors[colorScheme][500];
|
|
5679
|
+
const textColor = colorScheme === "yellow" ? "mono.black" : "mono.white";
|
|
5680
|
+
return {
|
|
5681
|
+
bgColor,
|
|
5682
|
+
color: textColor
|
|
5683
|
+
};
|
|
5684
|
+
},
|
|
5685
|
+
outline: ({ colorScheme, theme: { colors } }) => {
|
|
5686
|
+
const textColor = colorScheme === "mediatoolBlue" ? colors[colorScheme][500] : colors[colorScheme] && colors[colorScheme][700];
|
|
5687
|
+
return {
|
|
5688
|
+
bgColor: "mono.transparent",
|
|
5689
|
+
color: textColor
|
|
5690
|
+
};
|
|
5691
|
+
}
|
|
5692
|
+
}
|
|
5693
|
+
};
|
|
5694
|
+
|
|
5667
5695
|
var components = /*#__PURE__*/Object.freeze({
|
|
5668
5696
|
__proto__: null,
|
|
5669
5697
|
Alert: Alert,
|
|
5670
5698
|
Avatar: Avatar,
|
|
5699
|
+
Badge: Badge,
|
|
5671
5700
|
Blinker: Blinker,
|
|
5672
5701
|
Blockquote: Blockquote,
|
|
5673
5702
|
Breadcrumb: Breadcrumb,
|
|
@@ -13401,5 +13430,5 @@ const StepStack = (_a) => {
|
|
|
13401
13430
|
));
|
|
13402
13431
|
};
|
|
13403
13432
|
|
|
13404
|
-
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, Checkbox$1 as Checkbox, CheckboxField, Clickable, ClipboardInput, Collapse, ColorPicker$1 as ColorPicker, ColorPickerField, CustomTheme, DatePicker, DatePickerField, DateRangePicker, DateRangePickerField, DragAndDrop, DragHandle, DragItem, Draggable, DropZone, Droppable, EditableText, Fade, FastGrid, FastList, Field, FilePicker, FilePickerField, FlipButton$1 as FlipButton, FlipButtonGroup, FlipButtonGroupField, Form, FormLabel, FormattedNumberInput, FormattedNumberInputField, 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, IntentButton, Label$1 as Label, Lead$1 as Lead, MaskedTextInput, MediatoolThemeProvider, Menu, Modal, ModalBase, ModalBody, MultiFileList, MultiFilePicker, MultiFilePickerField, MultiFileUploader, MultiSort, NotificationIconButton, NumVal$1 as NumVal, NumberInput, NumberInputField, OrganizationLogo, OverflowGroup, P$1 as P, PaneDivider, PaneItem, PinInput, Popover, ProgressBar, Radio, RadioGroup, RadioGroupField, ResizeHandle, 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, Table, Tabs, Tag, TagGroup, TagsInput, TextField, Textarea, TextareaField, Tiny$1 as Tiny, Toast, Toolbox, ToolboxContent, ToolboxFooter, ToolboxHeader, Tooltip, 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 };
|
|
13433
|
+
export { Accordion, AccordionButton, AccordionItem, AccordionPanel, Alert$1 as Alert, AspectRatio, AsyncError, Avatar$1 as Avatar, AvatarGroup, Badge$1 as Badge, Blinker$1 as Blinker, Blockquote$1 as Blockquote, Button$1 as Button, Capitalized$1 as Capitalized, Carousel, Checkbox$1 as Checkbox, CheckboxField, Clickable, ClipboardInput, Collapse, ColorPicker$1 as ColorPicker, ColorPickerField, CustomTheme, DatePicker, DatePickerField, DateRangePicker, DateRangePickerField, DragAndDrop, DragHandle, DragItem, Draggable, DropZone, Droppable, EditableText, Fade, FastGrid, FastList, Field, FilePicker, FilePickerField, FlipButton$1 as FlipButton, FlipButtonGroup, FlipButtonGroupField, Form, FormLabel, FormattedNumberInput, FormattedNumberInputField, 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, IntentButton, Label$1 as Label, Lead$1 as Lead, MaskedTextInput, MediatoolThemeProvider, Menu, Modal, ModalBase, ModalBody, MultiFileList, MultiFilePicker, MultiFilePickerField, MultiFileUploader, MultiSort, NotificationIconButton, NumVal$1 as NumVal, NumberInput, NumberInputField, OrganizationLogo, OverflowGroup, P$1 as P, PaneDivider, PaneItem, PinInput, Popover, ProgressBar, Radio, RadioGroup, RadioGroupField, ResizeHandle, 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, Table, Tabs, Tag, TagGroup, TagsInput, TextField, Textarea, TextareaField, Tiny$1 as Tiny, Toast, Toolbox, ToolboxContent, ToolboxFooter, ToolboxHeader, Tooltip, 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 };
|
|
13405
13434
|
//# sourceMappingURL=northlight.js.map
|